File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ struct expected_pytype_for_arg<boost::optional<T> >
2626
2727#ifdef EIGENPY_WITH_CXX17_SUPPORT
2828template <typename T>
29- struct expected_pytype_for_arg <std::optional<T> >
30- : expected_pytype_for_arg<T> { };
29+ struct expected_pytype_for_arg <std::optional<T> > : expected_pytype_for_arg<T> {
30+ };
3131#endif
3232
3333} // namespace converter
@@ -37,18 +37,19 @@ struct expected_pytype_for_arg<std::optional<T> >
3737namespace eigenpy {
3838namespace detail {
3939
40- // / Helper struct to decide which type is the "none" type for a specific optional<T> implementation.
41- template <template <typename > class OptionalTpl >
40+ // / Helper struct to decide which type is the "none" type for a specific
41+ // / optional<T> implementation.
42+ template <template <typename > class OptionalTpl >
4243struct nullopt_helper {};
4344
44- template <>
45+ template <>
4546struct nullopt_helper <boost::optional> {
4647 typedef boost::none_t type;
4748 static type value () { return boost::none; }
4849};
4950
5051#ifdef EIGENPY_WITH_CXX17_SUPPORT
51- template <>
52+ template <>
5253struct nullopt_helper <std::optional> {
5354 typedef std::nullopt_t type;
5455 static type value () { return std::nullopt ; }
Original file line number Diff line number Diff line change @@ -46,9 +46,13 @@ function(config_bind_optional tagname opttype)
4646 configure_file (bind_optional.cpp.in ${MODNAME} .cpp)
4747
4848 set (py_file test_optional_${tagname} .py)
49- configure_file (python/test_optional.py.in ${CMAKE_CURRENT_SOURCE_DIR} /python/${py_file} )
49+ configure_file (python/test_optional.py.in
50+ ${CMAKE_CURRENT_SOURCE_DIR} /python/${py_file} )
5051 add_lib_unit_test(${MODNAME} )
51- message (STATUS "Adding unit test py-optional-${tagname} with file ${py_file} and module ${MODNAME} " )
52+ message (
53+ STATUS
54+ "Adding unit test py-optional-${tagname} with file ${py_file} and module ${MODNAME} "
55+ )
5256 add_python_unit_test("py-optional-${tagname} " "unittest/python/${py_file} "
5357 "unittest" )
5458endfunction ()
You can’t perform that action at this time.
0 commit comments