Boost logo

Boost :

From: Theodore Witkamp (ted_at_[hidden])
Date: 2007-09-19 18:33:47


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk