Fernando Cacciola said: > From: "Peter Dimov" <[EMAIL PROTECTED]> >> From: "Fernando Cacciola" <[EMAIL PROTECTED]> >> > From: "Peter Dimov" <[EMAIL PROTECTED]> >> > optional<> is not intended to replace _all_ situations were optional >> values >> > are used. >> > It is itended to be used on those situations were pointers are >> difficult >> to >> > use; >> > but I expect programmers to keep using pointers were appropriate. >> For example, as I said before, optional arguments to a function >> should > not >> > be coded >> > with optional<> but with conventional pointers. >> >> Actually (just a minor observation) >> >> void f(optional<T> /*const &*/ opt); >> >> is different than >> >> void f(T const * pt); >> >> as the latter might potentially store 'pt' while the former cannot. >> > ? You mean that the code inside f() could hold onto 'pt'? > Well, yes it can... but that would be nasty. > It is supposed to know that ownership is not being handed in. > The use of a pointer is reserved to convey optionality.
It is? Then how do you ever transfer ownership ;). William E. Kempf _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost