Eigen :: MatrixXf的boost :: lockfree队列

时间:2015-10-19 06:52:59

标签: c++ boost eigen eigen3

我正在尝试按照此示例创建boost::lockfree::queuehttp://www.boost.org/doc/libs/1_54_0/doc/html/lockfree/examples.html

我可以成功地为int(整数数据类型)创建它。但是我很难为Eigen :: MatrixXf创建一个队列。队列在SolveDGEM.h中声明。

boost::lockfree::queue<Eigen::MatrixXf> q_cam0;

我得到以下编译器错误,我无法理解

In file included from /home/eeuser/ros_workspaces/HeloRosProject/src/visensor_dgem/include/SolveDGEM.h:38:0,
                 from /home/eeuser/ros_workspaces/HeloRosProject/src/visensor_dgem/src/dgem.cpp:4:
/usr/local/include/boost/lockfree/queue.hpp: In instantiation of ‘boost::lockfree::queue<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >’:
/home/eeuser/ros_workspaces/HeloRosProject/src/visensor_dgem/include/SolveDGEM.h:76:45:   instantiated from here
/usr/local/include/boost/lockfree/queue.hpp:86:1: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’ 
/usr/local/include/boost/lockfree/queue.hpp: In instantiation of ‘boost::lockfree::queue<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >’:
/home/eeuser/ros_workspaces/HeloRosProject/src/visensor_dgem/include/SolveDGEM.h:76:45:   instantiated from here
/usr/local/include/boost/lockfree/queue.hpp:90:1: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’ 

1 个答案:

答案 0 :(得分:3)

请参阅http://www.boost.org/doc/libs/1_59_0/doc/html/boost/lockfree/queue.html

  

T必须有一个简单的析构函数

Eigen::MatrixXf不适用。