Re: [Boost-bugs] [Boost C++ Libraries] #10811: Add operators !=, <=, >, >=

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10811: Add operators !=, <=, >, >=
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-03 22:12:40


#10811: Add operators !=, <=, >, >=
-------------------------------+-----------------------
  Reporter: viboes | Owner: apolukhin
      Type: Feature Requests | Status: assigned
 Milestone: Boost 1.58.0 | Component: variant
   Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-----------------------

Comment (by viboes):

 Thanks even if I expected that operator>= be defined in terms of
 operator>= :(

 I find weird making private these kind of overloads.


 {{{
  inline bool operator>=(const variant& rhs) const
  {
  return !(*this < rhs);
  }
 }}}

 Does it means that


 {{{
 variant< int, string> v = 1;
 auto x = 1 < v;
 }}}

 would compile and

 {{{
 variant< int, string> v = 1;
 auto x = v < 1;
 }}}


 wouldn't?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10811#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC