boost::variant + auto conversion problem on VC 8

19 Sep
2007
19 Sep
'07
10:33 p.m.
The following code will compile fine on the ARM RVDS 3.0(EDG) compile but when I compile it on the VC 8.0 compiler I get a type conversion error. I can work around the error by explicitly calling the type conversion operator but that makes it a but pointless. I am building with boost 1.33.1. Is this a known problem with VC 8 and boost::variant? Thanks #include <boost/variant.hpp> typedef boost::variant<int,char*,float> var_type; struct auto_convert { operator var_type() const { return 10; } }; int main(int argc,char** argv) { var_type v = auto_convert(); return 0; } -- Theodore Witkamp CTO RiffWare 447 Oak Ave. Pasadena, CA 91106 Mb. 626-372-0931
6474
Age (days ago)
6474
Last active (days ago)
0 comments
1 participants
participants (1)
-
Theodore Witkamp