Marked output_proxy assignment as const.

This is also required for compliance with std::output_iterator concept.
This commit is contained in:
Andrey Semashev
2024-10-11 00:34:28 +03:00
parent 1ea8087623
commit 7c55a6cef8

View File

@ -37,8 +37,8 @@ namespace iterators {
template <class T>
typename boost::disable_if_c<
boost::is_same< typename boost::remove_cv< T >::type, output_proxy >::value,
output_proxy&
>::type operator=(const T& value) {
output_proxy const&
>::type operator=(const T& value) const {
m_f(value);
return *this;
}
@ -46,8 +46,8 @@ namespace iterators {
template <class T>
typename boost::disable_if_c<
boost::is_same< typename boost::remove_cv< typename boost::remove_reference< T >::type >::type, output_proxy >::value,
output_proxy&
>::type operator=(T&& value) {
output_proxy const&
>::type operator=(T&& value) const {
m_f(static_cast< T&& >(value));
return *this;
}