Fernando Cacciola <[EMAIL PROTECTED]> wrote: >> Even if I agree with you that an optional<T> should not be a T, >> an optional<T> is definitely not a pointer to T. >> > Definitely! > If HTML had blinking banners I think I'd use one to state this :-)
Nor should it model a pointer. That was my point and the point of others who dislike *opt. > Yet iterators are not pointers either but they do use > operators * and -> Iterators are not pointers, but they model the pointer. >> Right. In fact, looking at it more closely, I *could* almost agree with you >> that an optional<T> is not a T. There is in fact a getter function (get). >> In fact all three (tuple, optional and variant) have a get function. That's >> fine, yet, here again, the optional does not jive well because it returns >> access *by pointer* whereas both tuple and variant return access by >> reference. >> > This get() issue we agree should be fixed. Agreed. If there's a way to get at the values through a generic get function that unifies the access of optional with variant such that I can think of optional as an optimized specialization of variant<T, none>, I would be very happy. With such an interface, I can simply ignore the pointer-like interface, if you wish to keep it ;-) Thanks you very much! And BTW, kudos for such a well engineered library! Spirit has been using it since v1.7 and I am very happy with it. The comments I gave so far are merely my opinion. You are of course free to have your own preferences :-) Keep up the good work! Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost