开发者

How to debug Boost tuple error "no operator found which takes a left-hand operand of type"

开发者 https://www.devze.com 2023-03-31 03:57 出处:网络
I have a boost::tuple list and I am using remove method to remove one of the entrie开发者_开发技巧s from that list. But I am getting the following error. How can I get rid of this?

I have a boost::tuple list and I am using remove method to remove one of the entrie开发者_开发技巧s from that list. But I am getting the following error. How can I get rid of this?

c:\program files\microsoft visual studio 8\vc\include\algorithm(40) : error C2678: binary '==' : no operator found which takes a left-hand operand of type 'boost::tuples::tuple' (or there is no acceptable conversion)


You have to add an extra header for the comparisons

#include "boost/tuple/tuple_comparison.hpp"

see this link

http://www.boost.org/doc/libs/1_47_0/libs/tuple/doc/tuple_users_guide.html#using_library

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号