Re: [Boost-bugs] [Boost C++ Libraries] #13181: Boost test can't compare classes which have begin and end but not const_iterator

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13181: Boost test can't compare classes which have begin and end but not const_iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-29 21:34:44


#13181: Boost test can't compare classes which have begin and end but not
const_iterator
-------------------------------+-----------------------------
  Reporter: marc@… | Owner: Raffi Enficiaud
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: test
   Version: Boost 1.65.0 | Severity: Regression
Resolution: | Keywords:
-------------------------------+-----------------------------
Changes (by Raffi Enficiaud):

 * owner: Gennadiy Rozental => Raffi Enficiaud
 * status: new => assigned

Comment:

 Thanks for the report and the patch, will apply for 1.66.
 A couple of questions:

 * when you say "fails because s does not contain member types ...", does
 it mean compilation failure or test failure?
 * in 1.65, the behaviour changed to check only for the existence of
 begin/end, while up to 1.64, it was required to have also `value_type` and
 `const_iterator` (as well as `size`). In your case, that would mean that
 your class will switch to the collection comparison, while you are
 providing `operator==` and I guess you expect that this operator will be
 used. What is your suggestion?

 As a workaround, does this
 {{{
 BOOST_TEST((s1==s2));
 }}}
 work as you expect?

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13181#comment:1>
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-08-29 21:40:15 UTC