Subject: [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 19:47:19
#13181: Boost test can't compare classes which have begin and end but not
const_iterator
------------------------------+-------------------------------
Reporter: marc@⦠| Owner: Gennadiy Rozental
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost 1.65.0 | Severity: Regression
Keywords: |
------------------------------+-------------------------------
The following code:
{{{
struct s
{
const int *begin() const;
const int *end() const;
};
bool operator==(s,s);
std::ostream &operator<<(std::ostream &out, s);
BOOST_AUTO_TEST_CASE(foo)
{
s s1;
s s2;
BOOST_TEST(s1==s2);
}
}}}
When compiled in C++14 mode by gcc or clang, fails because `s` does not
contain member types `const_iterator` and `value_type`. This works in
C++03 mode, and it worked with boost 1.64.
The attached patch fixes the issue.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13181> 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 19:52:41 UTC