Subject: [Boost-bugs] [Boost C++ Libraries] #2009: suggested resiliency/ease-of-use
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-06-13 20:34:39
#2009: suggested resiliency/ease-of-use
------------------------------+---------------------------------------------
Reporter: dave | Owner: nesotto
Type: Feature Requests | Status: new
Milestone: Boost 1.36.0 | Component: range
Version: Boost 1.35.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
If I define a range type X and define only
{{{
X::iterator range_begin(X const&);
}}}
assuming that it should be picked up for {{{const}}} or non-{{{const X}}},
generic code will break when passed a non-{{{const X}}} when it tries to
do {{{boost::begin(x)}}} and that expression reaches inside {{{X}}}
looking for a {{{begin()}}} member.
It's possible to make the library resilient against this issue as shown by
the enclosed example
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2009>
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:49:58 UTC