[lockfree] Queue with shared_ptr as elements

Hello, Is it possible to use lockfree::queue with shared_ptr as element types? For instance, ---[code]--- #include <boost/lockfree/queue.hpp> #include <boost/smart_ptr.hpp> class foobar { }; int main() { typedef boost::shared_ptr<foobar> element_type; typedef boost::lockfree::queue<element_type> queue_type; queue_type queue; } ---[/code]--- If I compile the above code I get the following error: ---[error]--- boost_lockfree_mwmr_queue.cpp:13:13: required from here ~/projects/svn/boost-trunk/boost/lockfree/queue.hpp:81:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’ ~/projects/svn/boost-trunk/boost/lockfree/queue.hpp:85:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’ ---[/error]--- If I use "foobar" or "foobar*" as element_type, it works. I'm using - GCC 4.7.2 with the following options enabled: -Wextra -Wall -ansi -pedantic - boost SVN trunk version Thank you very much for helping. Best, -- Marco
participants (2)
-
Brian Budge
-
sguazt