Boost logo

Boost Users :

Subject: [Boost-users] [statechart] optional<event> - warning
From: Igor R (boost.lists_at_[hidden])
Date: 2010-08-05 13:46:39


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?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at