Subject: [Boost-bugs] [Boost C++ Libraries] #8463: function_output_iterator: MSVC warning C4512
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-19 18:10:30
#8463: function_output_iterator: MSVC warning C4512
--------------------------------------------------------------------------+-
Reporter: Mike Cowperthwaite <michael.cowperthwaite@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.52.0
Severity: Problem | Keywords:
--------------------------------------------------------------------------+-
In `boost/function_output_iterator` the struct
`function_output_iterator::output_proxy` yields this warning: "assignment
operator could not be generated."
I see this primarily using signals2, where the iterator class is created
using `boost::signals2::detail::does_nothing` as the iterator template
argument.
The warning is due to the proxy's const data member, and probably not
dependent on the iterator template argument.
The struct also has a templated operator= defined, but not of the sort
that would work as a copy-assignment.
Other libraries (fusion, spirit, statechart in particular) have
implemented do-nothing assignment operators (or just declarations) to
overcome similar symptoms. If I do the same for this class in my local
copy -- simply add a declaration for this particular signature:
{{{
private:
output_proxy& operator=(output_proxy const &src);
}}}
the warning goes away; however, I can't be sure this doesn't break
something. It seems unlikely, as I can run code with the warning and my
signals seem to work just fine.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8463> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC