Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
eigenpy
Commits
2c1978ad
Commit
2c1978ad
authored
1 year ago
by
pre-commit-ci[bot]
Browse files
Options
Downloads
Patches
Plain Diff
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see
https://pre-commit.ci
parent
63ccfabe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/eigenpy/optional.hpp
+7
-6
7 additions, 6 deletions
include/eigenpy/optional.hpp
unittest/CMakeLists.txt
+6
-2
6 additions, 2 deletions
unittest/CMakeLists.txt
with
13 additions
and
8 deletions
include/eigenpy/optional.hpp
+
7
−
6
View file @
2c1978ad
...
@@ -26,8 +26,8 @@ struct expected_pytype_for_arg<boost::optional<T> >
...
@@ -26,8 +26,8 @@ struct expected_pytype_for_arg<boost::optional<T> >
#ifdef EIGENPY_WITH_CXX17_SUPPORT
#ifdef EIGENPY_WITH_CXX17_SUPPORT
template
<
typename
T
>
template
<
typename
T
>
struct
expected_pytype_for_arg
<
std
::
optional
<
T
>
>
struct
expected_pytype_for_arg
<
std
::
optional
<
T
>
>
:
expected_pytype_for_arg
<
T
>
{
:
expected_pytype_for_arg
<
T
>
{
};
};
#endif
#endif
}
// namespace converter
}
// namespace converter
...
@@ -37,18 +37,19 @@ struct expected_pytype_for_arg<std::optional<T> >
...
@@ -37,18 +37,19 @@ struct expected_pytype_for_arg<std::optional<T> >
namespace
eigenpy
{
namespace
eigenpy
{
namespace
detail
{
namespace
detail
{
/// Helper struct to decide which type is the "none" type for a specific optional<T> implementation.
/// Helper struct to decide which type is the "none" type for a specific
template
<
template
<
typename
>
class
OptionalTpl
>
/// optional<T> implementation.
template
<
template
<
typename
>
class
OptionalTpl
>
struct
nullopt_helper
{};
struct
nullopt_helper
{};
template
<
>
template
<
>
struct
nullopt_helper
<
boost
::
optional
>
{
struct
nullopt_helper
<
boost
::
optional
>
{
typedef
boost
::
none_t
type
;
typedef
boost
::
none_t
type
;
static
type
value
()
{
return
boost
::
none
;
}
static
type
value
()
{
return
boost
::
none
;
}
};
};
#ifdef EIGENPY_WITH_CXX17_SUPPORT
#ifdef EIGENPY_WITH_CXX17_SUPPORT
template
<
>
template
<
>
struct
nullopt_helper
<
std
::
optional
>
{
struct
nullopt_helper
<
std
::
optional
>
{
typedef
std
::
nullopt_t
type
;
typedef
std
::
nullopt_t
type
;
static
type
value
()
{
return
std
::
nullopt
;
}
static
type
value
()
{
return
std
::
nullopt
;
}
...
...
This diff is collapsed.
Click to expand it.
unittest/CMakeLists.txt
+
6
−
2
View file @
2c1978ad
...
@@ -46,9 +46,13 @@ function(config_bind_optional tagname opttype)
...
@@ -46,9 +46,13 @@ function(config_bind_optional tagname opttype)
configure_file
(
bind_optional.cpp.in
${
MODNAME
}
.cpp
)
configure_file
(
bind_optional.cpp.in
${
MODNAME
}
.cpp
)
set
(
py_file test_optional_
${
tagname
}
.py
)
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
}
)
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
}
"
add_python_unit_test
(
"py-optional-
${
tagname
}
"
"unittest/python/
${
py_file
}
"
"unittest"
)
"unittest"
)
endfunction
()
endfunction
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment