Opened 9 years ago
Last modified 9 years ago
#9562 new Bugs
boost::detail::operator_brackets_proxy::result_type::operator= return type is wrong
| Reported by: | Eric Niebler | Owned by: | jeffrey.hellrung |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | iterator |
| Version: | Boost 1.54.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
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.
Change History (2)
comment:1 by , 9 years ago
| Owner: | changed from to |
|---|
comment:2 by , 9 years ago
| Owner: | changed from to |
|---|
Note:
See TracTickets
for help on using tickets.
