Fernando Cacciola <[EMAIL PROTECTED]> wrote: > Joel de Guzman <[EMAIL PROTECTED]> wrote in message
> Direct initialization: opt = 1 > seems right since this operation is never undefined. > This would mirror variant's interface. Ok. > Direct value accesing via implicit conversion: int i = opt > seems wrong because this is the operation that can lead to undefined > behaviour. Doesn't have to be undefined behaviour. Aren't you throwing an exception or something? variant throws throws a bad_get exception when you get a reference to a T which is not the held type. I don't see a problem why you can't do something similar. -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost