New paper: N3765, On Optional -- Tony Van Eerd

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3764

Date: 2013-09-01

On Optional

by Tony Van Eerd

Excerpt:

optional<T>::operator<() is currently defined in terms of std::less(). The reasoning for this was to
enable things like optional<T*> to work correctly in standard containers like std::map<>.

However, it would be better to instead specialize std::less for optional<T>.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.