Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost fixed width integer types with std equivalents #5

Merged
merged 1 commit into from
May 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/lsst/pex/config/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"int": int,
"double": float,
"float": float,
"boost::int64_t": int,
"std::int64_t": int,
"std::string": str
}

Expand Down Expand Up @@ -120,7 +120,7 @@ class will be silently ignored; this allows the user to customize fields and
be present as base class fields or other instance attributes or descriptors.

While LSST_CONTROL_FIELD will work for any C++ type, automatic Config generation
only supports bool, int, boost::int64_t, double, and std::string fields, along
only supports bool, int, std::int64_t, double, and std::string fields, along
with std::list and std::vectors of those types.
"""
if name is None:
Expand Down
9 changes: 5 additions & 4 deletions tests/testLib.i
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ Various swigged-up C++ classes for testing
%lsst_exceptions()

%{
#include <cstdint>

#include "lsst/pex/config.h"
#include "boost/cstdint.hpp"
%}

%include "lsst/pex/config.h"
Expand All @@ -52,9 +53,9 @@ Various swigged-up C++ classes for testing

struct InnerControlObject {
LSST_CONTROL_FIELD(p, double, "a double field");
LSST_CONTROL_FIELD(q, boost::int64_t, "a 64-bit integer field");
LSST_CONTROL_FIELD(q, std::int64_t, "a 64-bit integer field");

explicit InnerControlObject(double p_ = 2.0) : p(p_), q(boost::int64_t(1) << 33) {}
explicit InnerControlObject(double p_ = 2.0) : p(p_), q(std::int64_t(1) << 33) {}
};

struct OuterControlObject {
Expand All @@ -77,7 +78,7 @@ Various swigged-up C++ classes for testing
return fooVal == ctrl.foo && barVal == ctrl.bar;
}

bool checkNestedControl(OuterControlObject const & ctrl, double apVal, boost::int64_t aqVal, int bVal) {
bool checkNestedControl(OuterControlObject const & ctrl, double apVal, std::int64_t aqVal, int bVal) {
return ctrl.a.p == apVal && ctrl.b == bVal && ctrl.a.q == aqVal;
}

Expand Down