Subject: [Boost-bugs] [Boost C++ Libraries] #9562: boost::detail::operator_brackets_proxy::result_type::operator= return type is wrong
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-11 19:05:22
#9562: boost::detail::operator_brackets_proxy::result_type::operator= return type
is wrong
------------------------------+----------------------
Reporter: eric_niebler | Owner: witt
Type: Bugs | Status: new
Milestone: To Be Determined | Component: iterator
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
------------------------------+----------------------
From boost/iterator/detail/operator_brackets_dispatch.hpp:
{{{
template <class Iterator, class Reference>
struct operator_brackets_proxy
{
class result_type
{
Iterator const m_i;
explicit result_type(Iterator const & i) : m_i(i) { }
friend struct operator_brackets_proxy;
void operator=(result_type&);
public:
operator Reference() const { return *m_i; }
operator_brackets_proxy const & operator=(
typename Iterator::value_type const & x) const
{ *m_i = x; return *this; }
};
static result_type apply(Iterator const & i)
{ return result_type(i); }
};
}}}
The return type of `result_type::operator=` should be `result_type const
&`, not `operator_brackets_proxy const &`. This looks like a typo.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9562> 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:15 UTC