Opened 13 years ago

#3720 new Feature Requests

templated comparison operators

Reported by: anonymous Owned by: Fernando Cacciola
Milestone: Boost 1.42.0 Component: optional
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc:

Description

template<class T> inline bool operator == ( optional<T> const& x, optional<T> const& y ) ;

and all other comparison operators should be replaced by

template<class T,class Y> bool operator==(optional<T> const &,optional<Y> const &);

so optionals of different but comparable types can be compared.

Change History (0)

Note: See TracTickets for help on using tickets.