
21 Mar
2014
21 Mar
'14
5:08 a.m.
On 03/21/2014 12:00 PM, Konrad Rybacki wrote:
class Test { public: boost::optional<boost::variant<int, std::string>> m_value; };
Seems to me that you need to refer to the type of the member variable, not the actual instance, so: class Test { public: typedef boost::optional<boost::variant<int, std::string>> Value; Value m_value; }; auto b2 = boost::lambda::bind(Test::Value::get_value_or, boost::lambda::_1, "empty"); WBR, Adam Romanek