[Interprocess] move semantics for intrusive_ptr
 
            Dear all, would it be possible to add the rvalue operators to interprocess::intrusive_ptr akin to what is already available in "regular" boost::intrusive_ptr: // Move support #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px ) { rhs.px = 0; } intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT { this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); return *this; } #endif many thanks, Mikolaj
 
            On 13/01/2017 13:42, Mikolaj Krzewicki wrote:
Dear all, would it be possible to add the rvalue operators to interprocess::intrusive_ptr akin to what is already available in "regular" boost::intrusive_ptr:
// Move support
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px ) { rhs.px = 0; }
intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT { this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); return *this; }
#endif
Sure, please fill a ticket so this is not forgotten. Best, Ion
participants (2)
- 
                 Ion Gaztañaga Ion Gaztañaga
- 
                 Mikolaj Krzewicki Mikolaj Krzewicki