On Tue, Nov 25, 2014 at 7:33 PM, Edward Diener
If the C++ standard says that associative container of std::optionals is fine but some programmers believe that manually comparing them via the less than operator is not fine, I think we have a real conceptual problem here, even outside of the mere non-orthogonality of the situation.
We already have this kind of thing in the standard. Consider pointer types. You can use std::less with arbitrary pointers, but this is not the case with operator< (though operator< is well defined when the objects pointed to are in the same array). Again, I'm not advocating leaving out operator< for optional, but if the main reason why people want it is because it makes it easy to work with associative containers, we already have precedent in the standard to allow this and not operator<. -- -Matt Calabrese