From 7c55a6cef8c15a72dc5cfec6bad9d2b12fbc968f Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 11 Oct 2024 00:34:28 +0300 Subject: [PATCH] Marked output_proxy assignment as const. This is also required for compliance with std::output_iterator concept. --- include/boost/iterator/function_output_iterator.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/iterator/function_output_iterator.hpp b/include/boost/iterator/function_output_iterator.hpp index eeb8ddf00..ea2a668bb 100644 --- a/include/boost/iterator/function_output_iterator.hpp +++ b/include/boost/iterator/function_output_iterator.hpp @@ -37,8 +37,8 @@ namespace iterators { template 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 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; }