$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [SPAM (Header)] - Re: [optional] little addition... optional_move_to? - Number of numbers in MIME From exceeds maximum threshold
From: Fernando Cacciola (fernando.cacciola_at_[hidden])
Date: 2009-03-06 09:08:26
Hi Arno,
> Regular assignment, without killing the source, should work as well, though.
Right... so your very first proposal can't really be replaced by Niels's
poposals optional_swap() and move_to().
So the next big question would be:
With C++0x, optional_swap() and otional_move_to(), both worth by their
own right IMO, will be implementable as free functions, which I prefer
to member functions.
But that can't be implemented today without a move emulation library,
like Ion Gaztañaga's Boost.Move.
Yet even if I wanted to use that, I can't before it is formally added
into boost.
So, the choice *right now* is to either add these two functions as
members or not add them at all.
But if I add them as members today, there would be a slight
inconsistency with optional_assing being a free function instead.
Thus, until move semantics are practically usable (whether via
Boost.Move or C++0x) I would either add the three functions as member
functions, or just your optional_assign() as a free function, but not
two members and one free standing.
What do you think?
-- Fernando Cacciola SciSoft Consulting, Founder http://www.scisoft-consulting.com