Registered Member
|
|
Moderator
|
I don't know boost::allocate_shared but if that's working with a standard allocator, then that should work too. Can you attach the errors.
|
Registered Member
|
Compiler: g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:32:0, from /usr/include/boost/smart_ptr/make_shared.hpp:16, from /usr/include/boost/make_shared.hpp:15, from /host/Dropbox/codes/testing/trypcl/io/compile.cc:1: /usr/include/boost/smart_ptr/detail/shared_count.hpp: In constructor ‘boost::detail::shared_count::shared_count(P, D, A) [with P = Apple*, D = boost::detail::sp_ms_deleter<Apple>, A = Eigen::aligned_allocator<Apple>]’: /usr/include/boost/smart_ptr/shared_ptr.hpp:205:93: instantiated from ‘boost::shared_ptr< <template-parameter-1-1> >::shared_ptr(Y*, D, A) [with Y = Apple, D = boost::detail::sp_ms_deleter<Apple>, A = Eigen::aligned_allocator<Apple>, T = Apple]’ /usr/include/boost/smart_ptr/make_shared.hpp:121:88: instantiated from ‘boost::shared_ptr<X> boost::allocate_shared(const A&) [with T = Apple, A = Eigen::aligned_allocator<Apple>]’ /host/Dropbox/codes/testing/trypcl/io/compile.cc:12:52: instantiated from here /usr/include/boost/smart_ptr/detail/shared_count.hpp:159:13: error: no matching function for call to ‘Eigen::aligned_allocator<boost::detail::sp_counted_impl_pda<Apple*, boost::detail::sp_ms_deleter<Apple>, Eigen::aligned_allocator<Apple> > >::allocate(int, boost::detail::shared_count::shared_count(P, D, A) [with P = Apple*, D = boost::detail::sp_ms_deleter<Apple>, A = Eigen::aligned_allocator<Apple>]::impl_type*)’ /usr/local/include/eigen3/Eigen/src/Core/util/Memory.h:669:13: note: candidate is: T* Eigen::aligned_allocator<T>::allocate(Eigen::aligned_allocator::size_type, const T**) [with T = boost::detail::sp_counted_impl_pda<Apple*, boost::detail::sp_ms_deleter<Apple>, Eigen::aligned_allocator<Apple> >, T* = boost::detail::sp_counted_impl_pda<Apple*, boost::detail::sp_ms_deleter<Apple>, Eigen::aligned_allocator<Apple> >*, Eigen::aligned_allocator::size_type = unsigned int, const T* = const boost::detail::sp_counted_impl_pda<Apple*, boost::detail::sp_ms_deleter<Apple>, Eigen::aligned_allocator<Apple> >*] make[2]: *** [io/CMakeFiles/compile.dir/compile.cc.o] Error 1 make[1]: *** [io/CMakeFiles/compile.dir/all] Error 2 make: *** [all] Error 2 |
Registered Member
|
This one compiles fine.
|
Moderator
|
hm, which version of eigen do you have ? I've nothing line 669 of Memory.h; neither in 3.0.5 or 3.1-alpha2.
|
Moderator
|
also your example first compiles fine here with 3.0.5 or 3.1.0-alpha2
|
Registered Member
|
It was with 3.0.1/3.0.2.
I just updated Eigen to 3.1.0-alpha2, and it works now. Thank you. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]