Boost logo

Boost :

Subject: Re: [boost] [optional] little addition... optional_move_to?
From: Fernando Cacciola (fernando.cacciola_at_[hidden])
Date: 2009-03-04 10:22:06


Hi Niels Dekker,

> Fernando Cacciola wrote:
>> That is, we can't just yet write that as:
>> template<class T, class U> bool optional_assign( T&, optional<U>&& ) ;
>> as we would a few years from now.
>
> Well, we can achieve almost the same in old C++03, by declaring the
> function as a /member/ of optional<T>. I'd suggest naming it
> "optional_move_to", as follows:
>
Nice one! :)

I keep wondering whether being member functions, these move_to() and
swap() need the "optional_" name prefix? (not that it is that important
though)

--
Fernando Cacciola
SciSoft Consulting
http://www.scisoft-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk