Boost logo

Boost Users :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2004-12-20 13:33:06


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 <boost/bind.hpp>
>#include <boost/signals.hpp>
>#include <boost/variant.hpp>
>
>#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<MessageException, Message> MessageVariant;
>
>class TestWrap
>{
>public:
> TestWrap(){}
>
> typedef boost::signal1<void, MessageVariant> MessageSignal;
> //typedef boost::signal<void (MessageVariant)> MessageSignal;
>
>
> void send_signal (MessageVariant& variant)
> {
> m_message_signal( variant );
> }
>private:
> MessageSignal m_message_signal;
>};
>
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>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"


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net