Skip to content

Commit 2c1978a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 63ccfab commit 2c1978a

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

include/eigenpy/optional.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ struct expected_pytype_for_arg<boost::optional<T> >
2626

2727
#ifdef EIGENPY_WITH_CXX17_SUPPORT
2828
template <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> >
3737
namespace eigenpy {
3838
namespace 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>
4243
struct nullopt_helper {};
4344

44-
template<>
45+
template <>
4546
struct 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 <>
5253
struct nullopt_helper<std::optional> {
5354
typedef std::nullopt_t type;
5455
static type value() { return std::nullopt; }

unittest/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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")
5458
endfunction()

0 commit comments

Comments
 (0)