From: "Fernando Cacciola" <[EMAIL PROTECTED]>
> I still don't like to think of optional<> as a container, so I still don't
> like this reset.

I don't see why. reset() has nothing to do with containership; it's a
generic shorthand for reconstructing an object in place.

void X::reset(args)

Effects: destroys the contents of *this (if any)
Postconditions: *this is equivalent to X(args)

> Currently, you can change the value of the optional directly without any
> performance
> penalty like this: *opt = new_val, so I don't see any real need for
reset().

Not correct, *opt has undefined behavior when opt is uninitialized.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to