"Edward Diener" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> Douglas Paul Gregor <[EMAIL PROTECTED]> writes: >> >>> On Mon, 24 Mar 2003, Edward Diener wrote: >>> >>>> Do you really want the key to an associative container to be an >>>> optional value ? I would be hard-pressed to find a use for that. >>> >>> FWIW, the Signals library actually does this internally (although >>> with boost::any objects instead of boost::optional objects). >>> However, I would contend that the need is too specialized to warrant >>> adding an operator<. >> >> Seems entirely reasonable to me to add it. It looks like at least two >> people have needed exactly those semantics. What's the cost? > > I am not trying to shoot down the request but could someone give me a > practical example of the case where an optional value which does not exist > ( I hope that's the right term for when an optional value has no valid > value ) serves as a key in an associative container ?
I guess you can look at how boost::any is used in the signals library for an example. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost