Skip to content

Commit

Permalink
C++11 syntax fixes for PythonInterface. refs #6592
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Feb 19, 2013
1 parent 2279890 commit d4ff809
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
* an implicit conversion between them both
*/
#define REGISTER_SHARED_PTR_TO_PYTHON(TYPE) \
boost::python::register_ptr_to_python<boost::shared_ptr<TYPE>>();\
boost::python::register_ptr_to_python<boost::shared_ptr<const TYPE>>();\
boost::python::implicitly_convertible<boost::shared_ptr<TYPE>, boost::shared_ptr<const TYPE>>();
boost::python::register_ptr_to_python<boost::shared_ptr<TYPE> >();\

This comment has been minimized.

Copy link
@martyngigg

martyngigg Feb 19, 2013

Member

Didn't C++11 fix the standard around the right-angle brackets so you don't need the space?

This comment has been minimized.

Copy link
@peterfpeterson

peterfpeterson Feb 21, 2013

Member

Not all compilers support that part of c++11.

boost::python::register_ptr_to_python<boost::shared_ptr<const TYPE> >();\
boost::python::implicitly_convertible<boost::shared_ptr<TYPE>, boost::shared_ptr<const TYPE> >();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ void export_InstrumentValidator()
using namespace Mantid::API;
using namespace boost::python;
EXPORT_TYPEDVALIDATOR(ExperimentInfo_sptr);
class_<InstrumentValidator, bases<Mantid::Kernel::TypedValidator<ExperimentInfo_sptr>>,
class_<InstrumentValidator, bases<Mantid::Kernel::TypedValidator<ExperimentInfo_sptr> >,
boost::noncopyable
>("InstrumentValidator", init<>("Checks that the workspace has an instrument defined"))
;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using namespace boost::python;
namespace
{
/// The PropertyWithValue type
typedef std::vector<std::vector<std::string>> HeldType;
typedef std::vector<std::vector<std::string> > HeldType;

/**
* Converts the value from a MultipleFileProperty to a python object rather than using a vector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void export_MatrixWorkspaceValidator()
using Mantid::API::MatrixWorkspaceValidator;
EXPORT_TYPEDVALIDATOR(MatrixWorkspace_sptr);
class_<MatrixWorkspaceValidator,
bases<TypedValidator<MatrixWorkspace_sptr>>,
bases<TypedValidator<MatrixWorkspace_sptr> >,
boost::noncopyable>("MatrixWorkspaceValidator", no_init)
;
}
Expand Down

0 comments on commit d4ff809

Please sign in to comment.