Skip to content

Commit

Permalink
Marked output_proxy assignment as const.
Browse files Browse the repository at this point in the history
This is also required for compliance with std::output_iterator concept.
  • Loading branch information
Lastique committed Oct 10, 2024
1 parent 1ea8087 commit 7c55a6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/boost/iterator/function_output_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ 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;
}
#else
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;
}
Expand Down

0 comments on commit 7c55a6c

Please sign in to comment.