David Abrahams wrote: > "Peter Dimov" <[EMAIL PROTECTED]> writes: > >> It may be possible to use optional<T&> (is it supported?) or >> optional< reference_wrapper<T> > but this looks like an "obfuscated >> C++" entry to me compared to T*. > > Good point. > >> What's wrong with it? What does optional<T&> add? > > Suppose you have a > > variant<mpl::list<int&, std::string&> > > > How do you check to see if it contains an int&?
You don't. "int&" doesn't meet the variant requirements. Even if it did: variant< int, int& > v; How do you check to see if it contains an int&? _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost