your snippit compiles fine using my vs7.1 and the latest from CVS. is there some code needed to instantiate any of this needed to cause the ICE? At Monday 2004-12-20 08:30, you wrote:
Hi
Environment: MS 7.1 compile with MS implementation of STL Boost 1.32.0
Summary:
I get an internal compiler error using boost::variant as a parameter of a boost::signal compiling with MSDEV 7.1, but not with gcc3.3/3.4 or MinGW (3.5).
Does anyone knows a workaround other than not using boost::signals?
Details
Using a signal with a variant of 2 simple classes (see code snippet) leads to an internal compiler error C1001. Using pragma command to turn optimisation off as Suggested by the compiler does not change a thing
Does anyone knows a workaround?
Regards, jom
Here's the bad code snippet:
#include
#include #include #include <vector>
class MessageException : public std::exception { public: MessageException() : std::exception( "Message error" ) {} };
class Message { public: typedef std::vector<unsigned char> Content;
Message(unsigned int p, unsigned char def = ' ') : m_vector( p, def ) {}
const Content& message() {return m_vector;} private: Content m_vector; };
typedef boost::variant
MessageVariant; class TestWrap { public: TestWrap(){}
typedef boost::signal1
MessageSignal; //typedef boost::signal MessageSignal; void send_signal (MessageVariant& variant) { m_message_signal( variant ); } private: MessageSignal m_message_signal; };
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"