Boost logo

Boost Users :

From: Kevin Scarr (kscarr_at_[hidden])
Date: 2008-03-21 11:57:42


Sorry about the cross-post to asio.user, it is a more general question.

I am receiving a number of warnings along the lines of the above when I
compile code using boost libraries. I see the warnings with
Boost.Variant, Boost.asio and others.

My code compiles, and appears to work fine, however, I am always nervous
about these kinds of warnings because I suspect there is something
waiting to bite me. I guess I am concerned as to what in my code is
causing the compiler to want to generate assignment operators.

Are these warnings symptomatic of a basic mistake I am making? I know
that you can't see the code, so this is only a general question. If
people think this might be a real problem, I am happy to try to make a
small code snippet to illustrate the problem.

Thanks for being there!
Kevin

Some examples:

Warning 3 warning C4512:
'boost::asio::detail::win_iocp_io_service::auto_work' : assignment
operator could not be generated;
c:\boost_1_34_1\include\boost-1_34_1\boost/asio/detail/win_iocp_io_service.hpp(574)
: see declaration of
'boost::asio::detail::win_iocp_io_service::auto_work'
c:\boost_1_34_1\include\boost-1_34_1\boost\asio\detail\win_iocp_io_service.hpp
588

Warning 9 warning C4512:
'boost::detail::variant::invoke_visitor<Visitor> with
[Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const
G2::doConnectConsumerToProducer,G2::G2ProducerTypes>]' : assignment
operator could not be generated;
c:\boost_1_34_1\include\boost-1_34_1\boost/variant/variant.hpp(1771) :
see reference to class template instantiation
'boost::detail::variant::invoke_visitor<Visitor> with
[Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const
G2::doConnectConsumerToProducer,G2::G2ProducerTypes>]' being compiled;
c:\boost_1_34_1\include\boost-1_34_1\boost/variant/detail/apply_visitor_unary.hpp(56)
: see reference to function template instantiation 'void
boost::variant<T0_,T1,T2>::apply_visitor<Visitor>(Visitor &) with
[T0_=G2::G2Consumer<G2::buffer> *,T1=G2::G2Consumer<G2::packet>
*,T2=G2::G2Consumer<G2::message>
*,Visitor=boost::detail::variant::apply_visitor_binary_unwrap<const
G2::doConnectConsumerToProducer,G2::G2ProducerTypes>]' being compiled;
c:\boost_1_34_1\include\boost-1_34_1\boost/variant/detail/apply_visitor_binary.hpp(165)
: see reference to function template instantiation 'void
boost::apply_visitor<boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>,Visitable1>(boost::detail::variant::apply_visitor_binary_unwrap<Visitor,Visitable2>
&,Visitable &) with [Visitor=const
G2::doConnectConsumerToProducer,Visitable2=G2::G2ProducerTypes,Visitable1=G2::G2ConsumerTypes,Visitable=G2::G2ConsumerTypes]'
being compiled; .\interfaces.cpp(133) : see reference to function
template instantiation 'void
boost::apply_visitor<G2::doConnectConsumerToProducer,G2::G2ConsumerTypes,G2::G2ProducerTypes>(const
Visitor &,Visitable1 &,Visitable2 &) with
[Visitor=G2::doConnectConsumerToProducer,Visitable1=G2::G2ConsumerTypes,Visitable2=G2::G2ProducerTypes]'
being compiled
c:\boost_1_34_1\include\boost-1_34_1\boost\variant\variant.hpp 894


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net