Federico J. Fernández wrote:
Hi Boosters!
I have been trying to use those libraries together. To be concrete, I want to have a variant of boost::statechart::event derived classes. The problem is that when I try to compile it I receive a lot of error messages, but the important ones say that there is no match for "operator new".. I mean, variant is calling a prototype of operator new that event doesn't offer.
Ouch, that's embarrassing. I've forgotten to overload placement new! Scott Meyers item 9 :-( I'll be checking in a fix this weekend. Problem is that this won't make it into 1.34.0 as we're in the stage of code-freeze.
/usr/include/boost/variant/variant.hpp: In constructor 'boost::variant
::variant() [with T0_ [...] /usr/include/boost/variant/variant.hpp:1174: error: no matching function for call to 'evt_reset::operator new(unsigned int, void*)' /usr/include/boost/statechart/event.hpp:38: note: candidates are: static void* boost::statechart::event
::operator new(size_t) [with MostDerived = evt_reset, Allocator = std::allocator<void>] Any idea? I want to have a container of this "events" and don't want to have a base class and working with virtual functions.
Out of curiosity, are these events processed by a boost::statechart::state_machine at some point? Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.