Skip to content
Snippets Groups Projects
Commit 2c1978ad authored by pre-commit-ci[bot]'s avatar pre-commit-ci[bot]
Browse files

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
parent 63ccfabe
No related branches found
No related tags found
No related merge requests found
Pipeline #27111 passed with warnings
......@@ -26,8 +26,8 @@ struct expected_pytype_for_arg<boost::optional<T> >
#ifdef EIGENPY_WITH_CXX17_SUPPORT
template <typename T>
struct expected_pytype_for_arg<std::optional<T> >
: expected_pytype_for_arg<T> {};
struct expected_pytype_for_arg<std::optional<T> > : expected_pytype_for_arg<T> {
};
#endif
} // namespace converter
......@@ -37,18 +37,19 @@ struct expected_pytype_for_arg<std::optional<T> >
namespace eigenpy {
namespace detail {
/// Helper struct to decide which type is the "none" type for a specific optional<T> implementation.
template<template <typename> class OptionalTpl>
/// Helper struct to decide which type is the "none" type for a specific
/// optional<T> implementation.
template <template <typename> class OptionalTpl>
struct nullopt_helper {};
template<>
template <>
struct nullopt_helper<boost::optional> {
typedef boost::none_t type;
static type value() { return boost::none; }
};
#ifdef EIGENPY_WITH_CXX17_SUPPORT
template<>
template <>
struct nullopt_helper<std::optional> {
typedef std::nullopt_t type;
static type value() { return std::nullopt; }
......
......@@ -46,9 +46,13 @@ function(config_bind_optional tagname opttype)
configure_file(bind_optional.cpp.in ${MODNAME}.cpp)
set(py_file test_optional_${tagname}.py)
configure_file(python/test_optional.py.in ${CMAKE_CURRENT_SOURCE_DIR}/python/${py_file})
configure_file(python/test_optional.py.in
${CMAKE_CURRENT_SOURCE_DIR}/python/${py_file})
add_lib_unit_test(${MODNAME})
message(STATUS "Adding unit test py-optional-${tagname} with file ${py_file} and module ${MODNAME}")
message(
STATUS
"Adding unit test py-optional-${tagname} with file ${py_file} and module ${MODNAME}"
)
add_python_unit_test("py-optional-${tagname}" "unittest/python/${py_file}"
"unittest")
endfunction()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment