Skip to content
Snippets Groups Projects
Commit 5d08e505 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

do not use namespace eigenpy and define bp

to fix on 18.04:
```
[ 94%] Building CXX object unittest/CMakeFiles/std_pair.dir/std_pair.cpp.o
cd /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest && /usr/bin/g++  -Dstd_pair_EXPORTS -I/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0 -isystem /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/include -isystem /usr/lib/python3/dist-packages/numpy/core/include -isystem /usr/include/python3.6 -isystem /usr/include/eigen3  -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion   -pipe  -O3 -DNDEBUG -fPIC   -std=gnu++14 -o CMakeFiles/std_pair.dir/std_pair.cpp.o -c /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp: In function 'void init_module_std_pair()':
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:28:3: error: reference to 'bp' is ambiguous
bp::def("std_pair_to_tuple", std_pair_to_tuple);
^~
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:8:29: note: candidates are: namespace bp = boost::boost::python;
namespace bp = boost::python;
^
In file included from /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/include/eigenpy/eigenpy.hpp:9:0,
from /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:4:
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/include/eigenpy/fwd.hpp:81:29: note:                 namespace eigenpy::bp = boost::boost::python;
namespace bp = boost::python;
^
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:29:3: error: reference to 'bp' is ambiguous
bp::def("copy", copy);
^~
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:8:29: note: candidates are: namespace bp = boost::boost::python;
namespace bp = boost::python;
^
In file included from /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/include/eigenpy/eigenpy.hpp:9:0,
from /local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/unittest/std_pair.cpp:4:
/local/robotpkg/var/tmp/robotpkg/math/py-eigenpy/work/eigenpy-3.3.0/include/eigenpy/fwd.hpp:81:29: note:                 namespace eigenpy::bp = boost::boost::python;
namespace bp = boost::python;
^
```
parent e55c5685
No related branches found
No related tags found
No related merge requests found
Pipeline #35807 passed with warnings
...@@ -18,12 +18,10 @@ std::pair<T1, T2> copy(const std::pair<T1, T2>& pair) { ...@@ -18,12 +18,10 @@ std::pair<T1, T2> copy(const std::pair<T1, T2>& pair) {
} }
BOOST_PYTHON_MODULE(std_pair) { BOOST_PYTHON_MODULE(std_pair) {
using namespace eigenpy; eigenpy::enableEigenPy();
enableEigenPy();
typedef std::pair<int, double> PairType; typedef std::pair<int, double> PairType;
StdPairConverter<PairType>::registration(); eigenpy::StdPairConverter<PairType>::registration();
bp::def("std_pair_to_tuple", std_pair_to_tuple<int, double>); bp::def("std_pair_to_tuple", std_pair_to_tuple<int, double>);
bp::def("copy", copy<int, double>); bp::def("copy", copy<int, double>);
......
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