Boost.Variant: char[], a bool or std::string ?
1 Jul
2006
1 Jul
'06
2:24 p.m.
If I instantiate a Boost.Variant templated on a bool and a std::string , then I get the following behaviour ... not sure why #include <string> #include <Boost/Variant.hpp> typedef boost::variant< bool,std::string> BoostVariant; int main () { BoostVariant v("A String"); bool &Bref ( boost::get<bool &>(v)) ; // this is ok std::string &Sref ( boost::get<std::string> &(v) ) ; // but this throws return 0; } Is this what is supposed to happen ? Ninds
6656
Age (days ago)
6656
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nindi Singh