Opened 14 years ago

Last modified 14 years ago

#2836 assigned Feature Requests

Request boost::optional<T>::optional_assign_to, optional_move_to, optional_swap

Reported by: aschoedl@… Owned by: niels_dekker
Milestone: Boost 1.39.0 Component: optional
Version: Boost 1.38.0 Severity: Optimization
Keywords: optional assign Cc: niels_address_until_2010-10-10@…

Description

I request the three member functions

template< class U > bool boost::optional<T>::optional_assign_to(U& t) const; template< class U > bool boost::optional<T>::optional_move_to(U& t); bool boost::optional<T>::optional_swap(T& t);

which, if !*this, return false, and otherwise return true and are equivalent to

t=this; t=this; and *this may have any value after the move std::swap( t, this );

Change History (1)

comment:1 by niels_dekker, 14 years ago

Cc: niels_address_until_2010-10-10@… added
Owner: changed from Niels Dekker to niels_dekker
Status: newassigned

Discussion on this subject: [boost] [optional] little addition http://lists.boost.org/Archives/boost/2009/02/149009.php

Note: See TracTickets for help on using tickets.