
4 Mar
2009
4 Mar
'09
3:22 p.m.
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