Hello, When I define optional<my_event>, I get a warning (MSVC10): warning C4291: 'void *boost::statechart::event<MostDerived>::operator new(size_t,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception In class statechart::event I see 2 overloads of operator new: void * operator new( std::size_t size ) void * operator new( std::size_t, void * p ) But only 1 operator delete: void operator delete( void * pEvent ) i.e., no placement delete. Is this intentional? Thanks.
Hi Igor
In class statechart::event I see 2 overloads of operator new: void * operator new( std::size_t size ) void * operator new( std::size_t, void * p ) But only 1 operator delete: void operator delete( void * pEvent ) i.e., no placement delete.
Is this intentional?
Yes, the matching placement operator delete would have an empty body. However, I will add one to silence the warning. May I ask you to open a ticket for this? Thanks, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Hi Igor Fixed in trunk, will be in 1.46: https://svn.boost.org/trac/boost/changeset/67083 Thanks for the report! Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
participants (2)
-
Andreas Huber
-
Igor R