mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-31 05:17:20 +02:00
Marked output_proxy assignment as const.
This is also required for compliance with std::output_iterator concept.
This commit is contained in:
@ -37,8 +37,8 @@ namespace iterators {
|
|||||||
template <class T>
|
template <class T>
|
||||||
typename boost::disable_if_c<
|
typename boost::disable_if_c<
|
||||||
boost::is_same< typename boost::remove_cv< T >::type, output_proxy >::value,
|
boost::is_same< typename boost::remove_cv< T >::type, output_proxy >::value,
|
||||||
output_proxy&
|
output_proxy const&
|
||||||
>::type operator=(const T& value) {
|
>::type operator=(const T& value) const {
|
||||||
m_f(value);
|
m_f(value);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -46,8 +46,8 @@ namespace iterators {
|
|||||||
template <class T>
|
template <class T>
|
||||||
typename boost::disable_if_c<
|
typename boost::disable_if_c<
|
||||||
boost::is_same< typename boost::remove_cv< typename boost::remove_reference< T >::type >::type, output_proxy >::value,
|
boost::is_same< typename boost::remove_cv< typename boost::remove_reference< T >::type >::type, output_proxy >::value,
|
||||||
output_proxy&
|
output_proxy const&
|
||||||
>::type operator=(T&& value) {
|
>::type operator=(T&& value) const {
|
||||||
m_f(static_cast< T&& >(value));
|
m_f(static_cast< T&& >(value));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user