私は以下のようなブースト再帰バリアントを持っています。assertを使用して2つの再帰バリアントオブジェクトを比較すると、正常に機能しますが、EXPECT_EQを使用すると、コンパイルエラーが発生します。
typedef boost::make_recursive_variant<bool, boost::uint8_t, boost::uint32_t,
boost::int32_t, double, std::string, boost::uuids::uuid>::type rvariant_type;
variant_type b1 = true;
rvariant_type b2 = true;
assert(b1 == b2); //work fine
EXPECT_EQ(b1,b2); //gives compiler error.
EXPECT_EQ(boost::get<bool>(b1), boost::get<bool>(b2)); //works fine
boost / v1.46.1 / include / boost / Variant / detail / Variant_io.hpp:64:エラー:'operator <<' in'((const boost :: detail :: Variant :: printer >> *)thisに一致しません)-> boost :: detail :: Variant :: printer >> ::out_<<オペランド'</p>