Opened 14 years ago

Last modified 10 years ago

#2928 new Bugs

Some relational operators are not listed in synopsis

Reported by: Kazutoshi Satoda <k_satoda@…> Owned by: Fernando Cacciola
Milestone: Boost 1.39.0 Component: optional
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

Direct comparison between optional<T> and T has been supported since Boost 1.34. But such operators are not listed in synopsis in the latest docs.

They were added to optional.html in r37126. But they seems to have been missed in r43247.

Change History (1)

comment:1 by Steven Watanabe, 10 years ago

I'm not very happy about the current implementation of these operators:

bool operator<(optional<T> const&, T const&);

Notes: calls T::T(const T&)

relational operators really have no need to make copies.

Also, it fails to match if T is a reference.

I don't want to write documentation for these functions until these detail are pinned down (either determining that this behavior is, in fact, correct, or fixing it.)

Note: See TracTickets for help on using tickets.