Opened 15 years ago

Closed 12 years ago

#1619 closed Bugs (fixed)

[Fusion] C4512 warnings from VC9 (Visual Studio 2008)

Reported by: Richard Webb <Richard.Webb@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

I've got some code which makes some simple use of fusion/tuple, and building it on VC9 with warning level 4 produces a large list of 4512 warnings from vector_iterator:

boost\fusion\container\vector\vector_iterator.hpp(42) : warning C4512: 'boost::fusion::vector_iterator<Vector,N>' : assignment operator could not be generated

It would be useful if this could be silenced, possibly by either disabling the warning with a pragma or by adding a private assignment operator.

Attachments (1)

fusion_param.diff (6.6 KB ) - added by Richard Webb <richard.webb@…> 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Richard Webb <richard.webb@…>, 15 years ago

Running the Fusion tests On VC9 with level 4 warnings results in a significant number of 4512 warnings:

boost/fusion/container/vector/vector_iterator.hpp(42) : warning C4512: 'boost::fusion::vector_iterator<Vector,N>' : assignment operator could not be generated
boost/fusion/container/list/cons_iterator.hpp(42) : warning C4512: 'boost::fusion::cons_iterator<Cons>' : assignment operator could not be generated
boost/fusion/container/deque/deque_iterator.hpp(102) : warning C4512: 'boost::fusion::deque_iterator<Seq,Pos>' : assignment operator could not be generated

boost/fusion/view/filter_view/filter_view.hpp(46) : warning C4512: 'boost::fusion::filter_view<Sequence,Pred>' : assignment operator could not be generated
boost/fusion/view/filter_view/filter_view_iterator.hpp(43) : warning C4512: 'boost::fusion::filter_iterator<First,Last,Pred>' : assignment operator could not be generated

boost/fusion/sequence/io/detail/manip.hpp(149) : warning C4512: 'boost::fusion::detail::string_ios_manip<Tag,Stream>' : assignment operator could not be generated

boost/fusion/view/single_view/single_view.hpp(42) : warning C4512: 'boost::fusion::single_view<T>' : assignment operator could not be generated
boost/fusion/view/single_view/single_view_iterator.hpp(42) : warning C4512: 'boost::fusion::single_view_iterator<SingleView>' : assignment operator could not be generated

boost/fusion/view/joint_view/joint_view.hpp(56) : warning C4512: 'boost::fusion::joint_view<Sequence1,Sequence2>' : assignment operator could not be generated

boost/fusion/view/transform_view/transform_view.hpp(102) : warning C4512: 'boost::fusion::transform_view<Sequence1,Sequence2>' : assignment operator could not be generated
boost/fusion/view/transform_view/transform_view.hpp(72) : warning C4512: 'boost::fusion::transform_view<Sequence1,Sequence2,F>' : assignment operator could not be generated

boost/fusion/view/reverse_view/reverse_view.hpp(53) : warning C4512: 'boost::fusion::reverse_view<Sequence>' : assignment operator could not be generated

boost/fusion/view/repetitive_view/repetitive_view.hpp(44) : warning C4512: 'boost::fusion::repetitive_view<Sequence>' : assignment operator could not be generated

boost/fusion/support/pair.hpp(40) : warning C4512: 'boost::fusion::pair<First,Second>' : assignment operator could not be generated
boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp(94) : warning C4512: 'boost::fusion::boost_tuple_iterator<Cons>' : assignment operator could not be generated
boost/fusion/adapted/struct/struct_iterator.hpp(98) : warning C4512: 'boost::fusion::struct_iterator<Struct,N_>' : assignment operator could not be generated

boost/fusion/functional/adapter/fused.hpp(80) : warning C4512: 'boost::fusion::fused<Function>' : assignment operator could not be generated
boost/fusion/functional/adapter/fused_function_object.hpp(85) : warning C4512: 'boost::fusion::fused_function_object<Function>' : assignment operator could not be generated
boost/fusion/functional/adapter/fused_procedure.hpp(66) : warning C4512: 'boost::fusion::fused_procedure<Function>' : assignment operator could not be generated
boost/fusion/functional/adapter/unfused_lvalue_args.hpp(72) : warning C4512: 'boost::fusion::unfused_lvalue_args<Function>' : assignment operator could not be generated
boost/fusion/functional/adapter/unfused_rvalue_args.hpp(72) : warning C4512: 'boost::fusion::unfused_rvalue_args<Function>' : assignment operator could not be generated
boost/fusion/functional/adapter/unfused_typed.hpp(64) : warning C4512: 'boost::fusion::unfused_typed<Function,Sequence>' : assignment operator could not be generated
boost/fusion/functional/adapter/unfused_generic.hpp(100) : warning C4512: 'boost::fusion::unfused_generic<Function>' : assignment operator could not be generated

boost/fusion/algorithm/query/detail/count.hpp(64) : warning C4512: 'boost::fusion::detail::count_compare<T1>' : assignment operator could not be generated

In addition to this, there are also quite a few unreferenced parameter warnings:

boost/fusion/adapted/mpl/mpl_iterator.hpp(83) : warning C4100: 'i' : unreferenced formal parameter
boost/fusion/iterator/mpl/convert_iterator.hpp(40) : warning C4100: 'x' : unreferenced formal parameter
boost/fusion/sequence/io/detail/out.hpp(38) : warning C4100: 'delim' : unreferenced formal parameter
boost/fusion/sequence/io/detail/out.hpp(38) : warning C4100: 'os' : unreferenced formal parameter
boost/fusion/sequence/io/detail/out.hpp(47) : warning C4100: 'os' : unreferenced formal parameter
boost/fusion/sequence/io/detail/in.hpp(38) : warning C4100: 'delim' : unreferenced formal parameter
boost/fusion/sequence/io/detail/in.hpp(47) : warning C4100: 'is' : unreferenced formal parameter
boost/fusion/sequence/comparison/equal_to.hpp(21) : warning C4100: 'b' : unreferenced formal parameter
boost/fusion/container/list/cons.hpp(53) : warning C4100: 'iter' : unreferenced formal parameter
boost/fusion/container/vector/vector10.hpp(54) : warning C4100: 'seq' : unreferenced formal parameter
boost/fusion/container/vector/vector.hpp(125) : warning C4100: 'index' : unreferenced formal parameter
boost/fusion/container/vector/detail/vector_n.hpp(105) : warning C4100: 'dummy' : unreferenced formal parameter
boost/fusion/view/zip_view/detail/distance_impl.hpp(73) : warning C4100: 'it2' : unreferenced formal parameter
boost/fusion/functional/invocation/invoke_function_object.hpp(123) : warning C4100: 's' : unreferenced formal parameter
boost/fusion/functional/invocation/invoke.hpp(204) : warning C4100: 's' : unreferenced formal parameter
boost/fusion/algorithm/transformation/clear.hpp(25) : warning C4100: 'seq' : unreferenced formal parameter

comment:2 by Richard Webb <richard.webb@…>, 15 years ago

Two more that i see when running the tests for xpressive:

boost/fusion/view/iterator_range/iterator_range.hpp(45) : warning C4512: 'boost::fusion::iterator_range<First,Last>' : assignment operator could not be generated
boost/fusion/view/transform_view/transform_view_iterator.hpp(42) : warning C4512: 'boost::fusion::transform_view_iterator<First,F>' : assignment operator could not be generated

comment:3 by Joel de Guzman, 13 years ago

I'd appreciate a patch, if you want this to be acted on immediately.

by Richard Webb <richard.webb@…>, 13 years ago

Attachment: fusion_param.diff added

comment:4 by Richard Webb <richard.webb@…>, 13 years ago

The attached patch silences a bunch of unreferenced parameter warnings from VC9.

comment:5 by Steven Watanabe, 12 years ago

Resolution: fixed
Status: newclosed

(In [62854]) Clean up MSVC build. Fixes #1619. Fixes #3074.

Note: See TracTickets for help on using tickets.