
21 Feb
2008
21 Feb
'08
8:01 p.m.
Hi Steven, the problem is related to the static_visitor, e.g. (from docs): boost::variant< int, std::string > u; ... class my_visitor : public boost::static_visitor<int> { public: int operator()(int i) const {return i;} int operator()(const std::string & str) const {return str.length(); } }; same for static_visitor<> etc. BUT static_visitor<bool>: class are_strict_equals : public boost::static_visitor<bool> { public: template <typename T, typename U> bool operator()( const T &, const U & ) const { return false; } template <typename T> bool operator()( const T & lhs, const T & rhs ) const { return lhs == rhs; } }; is binary! I've got compilation errors due to. Thanks, Olaf