From 7c986ebd610912c3ce78c256247a787bf637f03a Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Sat, 12 Jun 2010 15:58:31 +0000 Subject: [PATCH] Clean up MSVC build. Fixes #1619. Fixes #3074. [SVN r62854] --- .../boost_tuple/boost_tuple_iterator.hpp | 4 +++ .../adapted/class/detail/adapt_base.hpp | 3 ++ .../boost/fusion/adapted/mpl/mpl_iterator.hpp | 2 +- .../adapted/struct/detail/proxy_type.hpp | 3 ++ .../fusion/algorithm/query/detail/all.hpp | 2 +- .../fusion/algorithm/query/detail/count.hpp | 10 +++++++ .../fusion/algorithm/transformation/clear.hpp | 2 +- .../boost/fusion/container/deque/deque.hpp | 2 +- .../fusion/container/deque/deque_iterator.hpp | 4 +++ include/boost/fusion/container/list/cons.hpp | 6 ++-- .../boost/fusion/container/vector/vector.hpp | 4 +-- .../fusion/container/vector/vector10.hpp | 2 +- .../container/vector/vector_iterator.hpp | 13 +++----- .../boost/fusion/functional/adapter/fused.hpp | 10 +++++++ .../adapter/fused_function_object.hpp | 10 +++++++ .../functional/adapter/fused_procedure.hpp | 10 +++++++ .../fusion/functional/adapter/unfused.hpp | 11 +++++++ .../functional/adapter/unfused_typed.hpp | 9 ++++++ .../fusion/functional/invocation/invoke.hpp | 29 ++++++++++++++++-- .../invocation/invoke_function_object.hpp | 30 +++++++++++++++++-- .../invocation/invoke_procedure.hpp | 27 +++++++++++++++-- .../fusion/iterator/mpl/convert_iterator.hpp | 2 +- .../fusion/sequence/comparison/equal_to.hpp | 10 +++++++ include/boost/fusion/support/pair.hpp | 10 +++++++ .../fusion/view/filter_view/filter_view.hpp | 1 - .../view/filter_view/filter_view_iterator.hpp | 4 +++ .../view/iterator_range/iterator_range.hpp | 10 +++++++ .../fusion/view/joint_view/joint_view.hpp | 2 ++ .../view/joint_view/joint_view_iterator.hpp | 4 +++ .../view/nview/detail/distance_impl.hpp | 2 +- .../view/repetitive_view/repetitive_view.hpp | 4 +++ .../repetitive_view_iterator.hpp | 4 +++ .../fusion/view/reverse_view/reverse_view.hpp | 4 +++ .../reverse_view/reverse_view_iterator.hpp | 4 +++ .../fusion/view/single_view/single_view.hpp | 10 +++++++ .../view/single_view/single_view_iterator.hpp | 10 +++++++ .../view/transform_view/transform_view.hpp | 4 +++ .../view/zip_view/detail/distance_impl.hpp | 2 +- test/algorithm/fold.cpp | 2 +- test/sequence/adapt_assoc_class.cpp | 4 +-- test/sequence/adapt_assoc_class_named.cpp | 4 +-- test/sequence/adapt_assoc_struct.cpp | 4 +-- test/sequence/adapt_assoc_struct_named.cpp | 4 +-- test/sequence/adapt_assoc_tpl_class.cpp | 4 +-- test/sequence/adapt_assoc_tpl_struct.cpp | 4 +-- test/sequence/adapt_class.cpp | 4 +-- test/sequence/adapt_class_named.cpp | 4 +-- test/sequence/adapt_struct.cpp | 4 +-- test/sequence/adapt_struct_named.cpp | 4 +-- test/sequence/adapt_tpl_class.cpp | 4 +-- test/sequence/adapt_tpl_struct.cpp | 4 +-- test/sequence/cons.cpp | 9 +++--- test/sequence/define_assoc_struct.cpp | 4 +-- test/sequence/define_assoc_tpl_struct.cpp | 4 +-- test/sequence/define_struct.cpp | 4 +-- test/sequence/define_tpl_struct.cpp | 4 +-- test/sequence/iterator_range.cpp | 5 ++-- test/sequence/joint_view.cpp | 9 +++--- test/sequence/map.cpp | 13 ++++---- test/sequence/misc.hpp | 2 +- test/sequence/set.cpp | 13 ++++---- test/sequence/tr1_tuple_auto_conv.cpp | 2 +- 62 files changed, 313 insertions(+), 86 deletions(-) diff --git a/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp b/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp index cf3183b1..59eba66b 100644 --- a/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp +++ b/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp @@ -127,6 +127,10 @@ namespace boost { namespace fusion return type(); } }; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + boost_tuple_iterator& operator= (boost_tuple_iterator const&); }; template diff --git a/include/boost/fusion/adapted/class/detail/adapt_base.hpp b/include/boost/fusion/adapted/class/detail/adapt_base.hpp index 54b701f3..5cdbbcac 100644 --- a/include/boost/fusion/adapted/class/detail/adapt_base.hpp +++ b/include/boost/fusion/adapted/class/detail/adapt_base.hpp @@ -63,6 +63,9 @@ } \ \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ + \ + private: \ + class_member_proxy& operator= (class_member_proxy const&); \ }; \ \ template< \ diff --git a/include/boost/fusion/adapted/mpl/mpl_iterator.hpp b/include/boost/fusion/adapted/mpl/mpl_iterator.hpp index c99b5804..9c82028a 100644 --- a/include/boost/fusion/adapted/mpl/mpl_iterator.hpp +++ b/include/boost/fusion/adapted/mpl/mpl_iterator.hpp @@ -80,7 +80,7 @@ namespace boost { namespace fusion type; static type - call(Iterator const& i) + call(Iterator const& /*i*/) { return type(); } diff --git a/include/boost/fusion/adapted/struct/detail/proxy_type.hpp b/include/boost/fusion/adapted/struct/detail/proxy_type.hpp index 062f24a1..90a42444 100644 --- a/include/boost/fusion/adapted/struct/detail/proxy_type.hpp +++ b/include/boost/fusion/adapted/struct/detail/proxy_type.hpp @@ -23,6 +23,9 @@ {} \ \ WRAPPED_TYPE& obj; \ + \ + private: \ + NAME& operator= (NAME const&); \ }; \ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) diff --git a/include/boost/fusion/algorithm/query/detail/all.hpp b/include/boost/fusion/algorithm/query/detail/all.hpp index 51fd393f..c9284e86 100644 --- a/include/boost/fusion/algorithm/query/detail/all.hpp +++ b/include/boost/fusion/algorithm/query/detail/all.hpp @@ -106,7 +106,7 @@ namespace boost { namespace fusion { namespace detail struct unrolled_all<0> { template - static bool call(It const& it, F f) + static bool call(It const& /*it*/, F /*f*/) { return true; } diff --git a/include/boost/fusion/algorithm/query/detail/count.hpp b/include/boost/fusion/algorithm/query/detail/count.hpp index ff17adbd..0d03182a 100644 --- a/include/boost/fusion/algorithm/query/detail/count.hpp +++ b/include/boost/fusion/algorithm/query/detail/count.hpp @@ -7,10 +7,16 @@ #if !defined(FUSION_COUNT_09162005_0158) #define FUSION_COUNT_09162005_0158 +#include #include #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { namespace detail { template @@ -64,5 +70,9 @@ namespace boost { namespace fusion { namespace detail }; }}} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/algorithm/transformation/clear.hpp b/include/boost/fusion/algorithm/transformation/clear.hpp index c9f849cb..992a76ee 100644 --- a/include/boost/fusion/algorithm/transformation/clear.hpp +++ b/include/boost/fusion/algorithm/transformation/clear.hpp @@ -22,7 +22,7 @@ namespace boost { namespace fusion template inline typename result_of::clear::type - clear(Sequence const& seq) + clear(Sequence const& /*seq*/) { return vector0<>(); } diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 01f017e9..b5c9edd8 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -68,7 +68,7 @@ namespace boost { namespace fusion { {} template - deque(Sequence const& seq, typename disable_if >::type* dummy = 0) + deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) : base(base::from_iterator(fusion::begin(seq))) {} diff --git a/include/boost/fusion/container/deque/deque_iterator.hpp b/include/boost/fusion/container/deque/deque_iterator.hpp index c6e46d54..7a2fcf45 100644 --- a/include/boost/fusion/container/deque/deque_iterator.hpp +++ b/include/boost/fusion/container/deque/deque_iterator.hpp @@ -100,6 +100,10 @@ namespace boost { namespace fusion { {}; Seq& seq_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + deque_iterator& operator= (deque_iterator const&); }; }} diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 8e500f66..b977db14 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -46,11 +46,11 @@ namespace boost { namespace fusion nil() {} template - nil(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/) + nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) {} template - void assign_from_iter(Iterator const& iter) + void assign_from_iter(Iterator const& /*iter*/) { } }; @@ -92,7 +92,7 @@ namespace boost { namespace fusion is_convertible // use copy ctor instead , is_convertible // use copy to car instead > - >::type* dummy = 0 + >::type* /*dummy*/ = 0 ) : car(*fusion::begin(seq)) , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {} diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index e8284ca8..8eaa6a6f 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -111,7 +111,7 @@ namespace boost { namespace fusion typename add_reference< typename mpl::at::type >::type - at_impl(I index) + at_impl(I /*index*/) { return vec.at_impl(mpl::int_()); } @@ -122,7 +122,7 @@ namespace boost { namespace fusion typename mpl::at::type >::type >::type - at_impl(I index) const + at_impl(I /*index*/) const { return vec.at_impl(mpl::int_()); } diff --git a/include/boost/fusion/container/vector/vector10.hpp b/include/boost/fusion/container/vector/vector10.hpp index 929815ab..f1af70d7 100644 --- a/include/boost/fusion/container/vector/vector10.hpp +++ b/include/boost/fusion/container/vector/vector10.hpp @@ -52,7 +52,7 @@ namespace boost { namespace fusion vector0() {} template - vector0(Sequence const& seq) + vector0(Sequence const& /*seq*/) {} }; diff --git a/include/boost/fusion/container/vector/vector_iterator.hpp b/include/boost/fusion/container/vector/vector_iterator.hpp index d7ba8c88..559bbf17 100644 --- a/include/boost/fusion/container/vector/vector_iterator.hpp +++ b/include/boost/fusion/container/vector/vector_iterator.hpp @@ -7,11 +7,6 @@ #if !defined(FUSION_VECTOR_ITERATOR_05042005_0635) #define FUSION_VECTOR_ITERATOR_05042005_0635 -#if defined (BOOST_MSVC) -# pragma warning(push) -# pragma warning (disable: 4512) // assignment operator could not be generated. -#endif - #include #include #include @@ -44,12 +39,12 @@ namespace boost { namespace fusion vector_iterator(Vector& vec) : vec(vec) {} Vector& vec; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + vector_iterator& operator= (vector_iterator const&); }; }} -#if defined (BOOST_MSVC) -# pragma warning(pop) -#endif - #endif diff --git a/include/boost/fusion/functional/adapter/fused.hpp b/include/boost/fusion/functional/adapter/fused.hpp index 08e8897a..91ae1f2c 100644 --- a/include/boost/fusion/functional/adapter/fused.hpp +++ b/include/boost/fusion/functional/adapter/fused.hpp @@ -10,10 +10,16 @@ #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED #include +#include #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template class fused; @@ -81,5 +87,9 @@ namespace boost { namespace fusion }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/functional/adapter/fused_function_object.hpp b/include/boost/fusion/functional/adapter/fused_function_object.hpp index 12cd1e27..da8ac99b 100644 --- a/include/boost/fusion/functional/adapter/fused_function_object.hpp +++ b/include/boost/fusion/functional/adapter/fused_function_object.hpp @@ -10,10 +10,16 @@ #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED #include +#include #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template class fused_function_object; @@ -86,5 +92,9 @@ namespace boost { namespace fusion }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/functional/adapter/fused_procedure.hpp b/include/boost/fusion/functional/adapter/fused_procedure.hpp index 78034b97..10c7c7a0 100644 --- a/include/boost/fusion/functional/adapter/fused_procedure.hpp +++ b/include/boost/fusion/functional/adapter/fused_procedure.hpp @@ -10,10 +10,16 @@ #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED #include +#include #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template class fused_procedure; @@ -66,5 +72,9 @@ namespace boost { namespace fusion }; }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/functional/adapter/unfused.hpp b/include/boost/fusion/functional/adapter/unfused.hpp index 48baf756..b0d02bc4 100755 --- a/include/boost/fusion/functional/adapter/unfused.hpp +++ b/include/boost/fusion/functional/adapter/unfused.hpp @@ -17,11 +17,18 @@ #include +#include + #include #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template @@ -87,6 +94,10 @@ namespace boost { namespace fusion }; }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + namespace boost { template diff --git a/include/boost/fusion/functional/adapter/unfused_typed.hpp b/include/boost/fusion/functional/adapter/unfused_typed.hpp index 9ee3a7a6..0f19f28f 100644 --- a/include/boost/fusion/functional/adapter/unfused_typed.hpp +++ b/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -28,6 +28,11 @@ #include #include +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { @@ -69,6 +74,10 @@ namespace boost { namespace fusion }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + namespace boost { template diff --git a/include/boost/fusion/functional/invocation/invoke.hpp b/include/boost/fusion/functional/invocation/invoke.hpp index f021d923..085beb7e 100644 --- a/include/boost/fusion/functional/invocation/invoke.hpp +++ b/include/boost/fusion/functional/invocation/invoke.hpp @@ -199,6 +199,8 @@ namespace boost { namespace fusion Function(BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M +#if N > 0 + template static inline result_type call(F & f, Sequence & s) @@ -206,6 +208,17 @@ namespace boost { namespace fusion #define M(z,j,data) fusion::at_c(s) return f( BOOST_PP_ENUM(N,M,~) ); } + +#else + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + }; @@ -245,16 +258,28 @@ namespace boost { namespace fusion Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T)) >::type result_type; +#if N > 0 + template static inline result_type call(F & f, Sequence & s) { -#if N > 0 typename seq::I0 i0 = fusion::begin(s); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) -#endif return f( BOOST_PP_ENUM_PARAMS(N,*i) ); } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + }; #if N > 0 diff --git a/include/boost/fusion/functional/invocation/invoke_function_object.hpp b/include/boost/fusion/functional/invocation/invoke_function_object.hpp index 24c02c2b..81c33f92 100644 --- a/include/boost/fusion/functional/invocation/invoke_function_object.hpp +++ b/include/boost/fusion/functional/invocation/invoke_function_object.hpp @@ -118,6 +118,8 @@ namespace boost { namespace fusion Function (BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M +#if N > 0 + template static inline result_type call(F & f, Sequence & s) @@ -126,6 +128,18 @@ namespace boost { namespace fusion return f( BOOST_PP_ENUM(N,M,~) ); #undef M } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + }; template @@ -138,20 +152,32 @@ namespace boost { namespace fusion Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T)) >::type result_type; +#if N > 0 + template static inline result_type call(F & f, Sequence & s) { -#if N > 0 typename seq::I0 i0 = fusion::begin(s); #define M(z,j,data) \ typename seq::I##j i##j = \ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) #undef M -#endif return f( BOOST_PP_ENUM_PARAMS(N,*i) ); } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + }; template diff --git a/include/boost/fusion/functional/invocation/invoke_procedure.hpp b/include/boost/fusion/functional/invocation/invoke_procedure.hpp index 502b38aa..ddb5e506 100644 --- a/include/boost/fusion/functional/invocation/invoke_procedure.hpp +++ b/include/boost/fusion/functional/invocation/invoke_procedure.hpp @@ -106,10 +106,23 @@ namespace boost { namespace fusion template struct invoke_procedure_impl { + +#if N > 0 + static inline void call(Function & f, Sequence & s) { f(BOOST_PP_ENUM(N,M,~)); } + +#else + + static inline void call(Function & f, Sequence & /*s*/) + { + f(); + } + +#endif + }; #if N > 0 @@ -135,15 +148,25 @@ namespace boost { namespace fusion template struct invoke_procedure_impl { + +#if N > 0 + static inline void call(Function & f, Sequence & s) { -#if N > 0 typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(s); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) -#endif f( BOOST_PP_ENUM_PARAMS(N,*i) ); } + +#else + static inline void call(Function & f, Sequence & /*s*/) + { + f(); + } + +#endif + }; #if N > 0 diff --git a/include/boost/fusion/iterator/mpl/convert_iterator.hpp b/include/boost/fusion/iterator/mpl/convert_iterator.hpp index 5716ce4e..6cec5104 100644 --- a/include/boost/fusion/iterator/mpl/convert_iterator.hpp +++ b/include/boost/fusion/iterator/mpl/convert_iterator.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion } static mpl_iterator - call(T const& x, mpl::false_) + call(T const& /*x*/, mpl::false_) { return mpl_iterator(); } diff --git a/include/boost/fusion/sequence/comparison/equal_to.hpp b/include/boost/fusion/sequence/comparison/equal_to.hpp index fb27f15c..0c8a37e4 100644 --- a/include/boost/fusion/sequence/comparison/equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/equal_to.hpp @@ -13,6 +13,12 @@ #include #include #include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4100) // unreferenced formal parameter +#endif namespace boost { namespace fusion { @@ -43,4 +49,8 @@ namespace boost { namespace fusion using operators::operator==; }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index cf285714..a4ad4ee5 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -10,6 +10,12 @@ #include #include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -99,4 +105,8 @@ namespace boost { namespace fusion } }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/view/filter_view/filter_view.hpp b/include/boost/fusion/view/filter_view/filter_view.hpp index 69f17329..ca35c655 100644 --- a/include/boost/fusion/view/filter_view/filter_view.hpp +++ b/include/boost/fusion/view/filter_view/filter_view.hpp @@ -21,7 +21,6 @@ #include #include - namespace boost { namespace fusion { struct filter_view_tag; diff --git a/include/boost/fusion/view/filter_view/filter_view_iterator.hpp b/include/boost/fusion/view/filter_view/filter_view_iterator.hpp index 5d1efc87..6fbd0f50 100644 --- a/include/boost/fusion/view/filter_view/filter_view_iterator.hpp +++ b/include/boost/fusion/view/filter_view/filter_view_iterator.hpp @@ -58,6 +58,10 @@ namespace boost { namespace fusion : first(filter::call(first_converter::call(first))) {} first_type first; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + filter_iterator& operator= (filter_iterator const&); }; }} diff --git a/include/boost/fusion/view/iterator_range/iterator_range.hpp b/include/boost/fusion/view/iterator_range/iterator_range.hpp index 14bb2457..c535b84b 100644 --- a/include/boost/fusion/view/iterator_range/iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/iterator_range.hpp @@ -17,6 +17,12 @@ #include #include #include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -44,6 +50,10 @@ namespace boost { namespace fusion }; }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/view/joint_view/joint_view.hpp b/include/boost/fusion/view/joint_view/joint_view.hpp index 48d912cd..1655b8ce 100644 --- a/include/boost/fusion/view/joint_view/joint_view.hpp +++ b/include/boost/fusion/view/joint_view/joint_view.hpp @@ -62,6 +62,8 @@ namespace boost { namespace fusion concat_last_type concat_last() const { return fusion::end(seq2); } private: + // silence MSVC warning C4512: assignment operator could not be generated + joint_view& operator= (joint_view const&); typename mpl::if_, Sequence1, Sequence1&>::type seq1; typename mpl::if_, Sequence2, Sequence2&>::type seq2; diff --git a/include/boost/fusion/view/joint_view/joint_view_iterator.hpp b/include/boost/fusion/view/joint_view/joint_view_iterator.hpp index 0fd4c636..401abe2c 100644 --- a/include/boost/fusion/view/joint_view/joint_view_iterator.hpp +++ b/include/boost/fusion/view/joint_view/joint_view_iterator.hpp @@ -47,6 +47,10 @@ namespace boost { namespace fusion first_type first; concat_type concat; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + joint_view_iterator& operator= (joint_view_iterator const&); }; }} diff --git a/include/boost/fusion/view/nview/detail/distance_impl.hpp b/include/boost/fusion/view/nview/detail/distance_impl.hpp index 9bc860c5..8b1906f6 100644 --- a/include/boost/fusion/view/nview/detail/distance_impl.hpp +++ b/include/boost/fusion/view/nview/detail/distance_impl.hpp @@ -31,7 +31,7 @@ namespace boost { namespace fusion >::type type; static type - call(First const& first, Last const& last) + call(First const& /*first*/, Last const& /*last*/) { return type(); } diff --git a/include/boost/fusion/view/repetitive_view/repetitive_view.hpp b/include/boost/fusion/view/repetitive_view/repetitive_view.hpp index 050affb1..c37e8a3d 100644 --- a/include/boost/fusion/view/repetitive_view/repetitive_view.hpp +++ b/include/boost/fusion/view/repetitive_view/repetitive_view.hpp @@ -41,6 +41,10 @@ namespace boost { namespace fusion : seq(seq) {} stored_seq_type seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + repetitive_view& operator= (repetitive_view const&); }; }} diff --git a/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp b/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp index 9a7334de..f3550e81 100644 --- a/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp +++ b/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp @@ -43,7 +43,11 @@ namespace boost { namespace fusion Sequence& seq; pos_type pos; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + repetitive_view_iterator& operator= (repetitive_view_iterator const&); }; }} diff --git a/include/boost/fusion/view/reverse_view/reverse_view.hpp b/include/boost/fusion/view/reverse_view/reverse_view.hpp index 19b51d13..b76784c0 100644 --- a/include/boost/fusion/view/reverse_view/reverse_view.hpp +++ b/include/boost/fusion/view/reverse_view/reverse_view.hpp @@ -56,6 +56,10 @@ namespace boost { namespace fusion first_type first() const { return fusion::begin(seq); } last_type last() const { return fusion::end(seq); } typename mpl::if_, Sequence, Sequence&>::type seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reverse_view& operator= (reverse_view const&); }; }} diff --git a/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp b/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp index af2267e3..676319f0 100644 --- a/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp +++ b/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp @@ -45,6 +45,10 @@ namespace boost { namespace fusion : first(converter::call(first)) {} first_type first; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reverse_view_iterator& operator= (reverse_view_iterator const&); }; }} diff --git a/include/boost/fusion/view/single_view/single_view.hpp b/include/boost/fusion/view/single_view/single_view.hpp index 7c10afe6..a3f50af4 100644 --- a/include/boost/fusion/view/single_view/single_view.hpp +++ b/include/boost/fusion/view/single_view/single_view.hpp @@ -15,6 +15,12 @@ #include #include #include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -49,6 +55,10 @@ namespace boost { namespace fusion } }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/view/single_view/single_view_iterator.hpp b/include/boost/fusion/view/single_view/single_view_iterator.hpp index 1a44bb15..fa249015 100644 --- a/include/boost/fusion/view/single_view/single_view_iterator.hpp +++ b/include/boost/fusion/view/single_view/single_view_iterator.hpp @@ -12,6 +12,12 @@ #include #include #include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -42,6 +48,10 @@ namespace boost { namespace fusion }; }} +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/view/transform_view/transform_view.hpp b/include/boost/fusion/view/transform_view/transform_view.hpp index 78b6560e..5bf1447f 100644 --- a/include/boost/fusion/view/transform_view/transform_view.hpp +++ b/include/boost/fusion/view/transform_view/transform_view.hpp @@ -69,6 +69,10 @@ namespace boost { namespace fusion transform_type f; typename mpl::if_, Sequence1, Sequence1&>::type seq1; typename mpl::if_, Sequence2, Sequence2&>::type seq2; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view& operator= (transform_view const&); }; // Unary Version diff --git a/include/boost/fusion/view/zip_view/detail/distance_impl.hpp b/include/boost/fusion/view/zip_view/detail/distance_impl.hpp index 61447278..b2febd5b 100644 --- a/include/boost/fusion/view/zip_view/detail/distance_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/distance_impl.hpp @@ -70,7 +70,7 @@ namespace boost { namespace fusion { : detail::zip_view_iterator_distance::type { static typename detail::zip_view_iterator_distance::type - call(It1 const& it1, It2 const& it2) + call(It1 const& /*it1*/, It2 const& /*it2*/) { return typename detail::zip_view_iterator_distance::type(); } diff --git a/test/algorithm/fold.cpp b/test/algorithm/fold.cpp index ec51b406..4b2acfc5 100644 --- a/test/algorithm/fold.cpp +++ b/test/algorithm/fold.cpp @@ -43,7 +43,7 @@ struct add_ints_only template State - operator()(State const& state, T const& x) const + operator()(State const& state, T const& /*x*/) const { return state; } diff --git a/test/sequence/adapt_assoc_class.cpp b/test/sequence/adapt_assoc_class.cpp index cdbdd36b..4a14fdcd 100644 --- a/test/sequence/adapt_assoc_class.cpp +++ b/test/sequence/adapt_assoc_class.cpp @@ -98,14 +98,14 @@ main() { // conversion from ns::point to vector ns::point p(5, 3); - boost::fusion::vector v(p); + boost::fusion::vector v(p); v = p; } { // conversion from ns::point to list ns::point p(5, 3); - boost::fusion::list l(p); + boost::fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_assoc_class_named.cpp b/test/sequence/adapt_assoc_class_named.cpp index 90ed405a..b4c6f0ba 100644 --- a/test/sequence/adapt_assoc_class_named.cpp +++ b/test/sequence/adapt_assoc_class_named.cpp @@ -102,7 +102,7 @@ main() // conversion from adapted::point to vector ns::point basep(5, 3); adapted::point p(basep); - boost::fusion::vector v(p); + boost::fusion::vector v(p); v = p; } @@ -110,7 +110,7 @@ main() // conversion from adated::point to list ns::point basep(5, 3); adapted::point p(basep); - boost::fusion::list l(p); + boost::fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_assoc_struct.cpp b/test/sequence/adapt_assoc_struct.cpp index b9000bbd..2e3f14ea 100644 --- a/test/sequence/adapt_assoc_struct.cpp +++ b/test/sequence/adapt_assoc_struct.cpp @@ -104,14 +104,14 @@ main() { // conversion from ns::point to vector ns::point p = {5, 3}; - fusion::vector v(p); + fusion::vector v(p); v = p; } { // conversion from ns::point to list ns::point p = {5, 3}; - fusion::list l(p); + fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_assoc_struct_named.cpp b/test/sequence/adapt_assoc_struct_named.cpp index 004381cf..3ae0a380 100644 --- a/test/sequence/adapt_assoc_struct_named.cpp +++ b/test/sequence/adapt_assoc_struct_named.cpp @@ -88,7 +88,7 @@ main() // conversion from adapted::point to vector ns::point basep = {5, 3}; adapted::point p(basep); - vector v(p); + vector v(p); v = p; } @@ -96,7 +96,7 @@ main() // conversion from adapted::point to list ns::point basep = {5, 3}; adapted::point p(basep); - list l(p); + list l(p); l = p; } diff --git a/test/sequence/adapt_assoc_tpl_class.cpp b/test/sequence/adapt_assoc_tpl_class.cpp index 31a37d4c..d28face9 100644 --- a/test/sequence/adapt_assoc_tpl_class.cpp +++ b/test/sequence/adapt_assoc_tpl_class.cpp @@ -102,14 +102,14 @@ main() { // conversion from point to vector point p(5, 3); - boost::fusion::vector v(p); + boost::fusion::vector v(p); v = p; } { // conversion from point to list point p(5, 3); - boost::fusion::list l(p); + boost::fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_assoc_tpl_struct.cpp b/test/sequence/adapt_assoc_tpl_struct.cpp index b148c22b..ca751283 100644 --- a/test/sequence/adapt_assoc_tpl_struct.cpp +++ b/test/sequence/adapt_assoc_tpl_struct.cpp @@ -102,14 +102,14 @@ main() { // conversion from point to vector point p = {5, 3}; - vector v(p); + vector v(p); v = p; } { // conversion from point to list point p = {5, 3}; - list l(p); + list l(p); l = p; } diff --git a/test/sequence/adapt_class.cpp b/test/sequence/adapt_class.cpp index d0081808..cbadd41d 100644 --- a/test/sequence/adapt_class.cpp +++ b/test/sequence/adapt_class.cpp @@ -106,14 +106,14 @@ main() { // conversion from ns::point to vector ns::point p(5, 3); - fusion::vector v(p); + fusion::vector v(p); v = p; } { // conversion from ns::point to list ns::point p(5, 3); - fusion::list l(p); + fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_class_named.cpp b/test/sequence/adapt_class_named.cpp index fd3a248a..6f505eee 100644 --- a/test/sequence/adapt_class_named.cpp +++ b/test/sequence/adapt_class_named.cpp @@ -112,7 +112,7 @@ main() ns::point basep(5, 3); adapted::point p(basep); - fusion::vector v(p); + fusion::vector v(p); v = p; } @@ -121,7 +121,7 @@ main() ns::point basep(5, 3); adapted::point p(basep); - fusion::list l(p); + fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_struct.cpp b/test/sequence/adapt_struct.cpp index 981b9c13..7fd5cac0 100644 --- a/test/sequence/adapt_struct.cpp +++ b/test/sequence/adapt_struct.cpp @@ -97,14 +97,14 @@ main() { // conversion from ns::point to vector ns::point p = {5, 3}; - fusion::vector v(p); + fusion::vector v(p); v = p; } { // conversion from ns::point to list ns::point p = {5, 3}; - fusion::list l(p); + fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_struct_named.cpp b/test/sequence/adapt_struct_named.cpp index 5fa04af8..ec803854 100644 --- a/test/sequence/adapt_struct_named.cpp +++ b/test/sequence/adapt_struct_named.cpp @@ -103,7 +103,7 @@ main() // conversion from adapted::point to vector ns::point basep = {5, 3}; adapted::point p(basep); - fusion::vector v(p); + fusion::vector v(p); v = p; } @@ -111,7 +111,7 @@ main() // conversion from adapted::point to list ns::point basep = {5, 3}; adapted::point p(basep); - fusion::list l(p); + fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_tpl_class.cpp b/test/sequence/adapt_tpl_class.cpp index 7a1b0be9..1dec528b 100644 --- a/test/sequence/adapt_tpl_class.cpp +++ b/test/sequence/adapt_tpl_class.cpp @@ -110,14 +110,14 @@ main() { // conversion from point to vector point p(5, 3); - boost::fusion::vector v(p); + boost::fusion::vector v(p); v = p; } { // conversion from point to list point p(5, 3); - boost::fusion::list l(p); + boost::fusion::list l(p); l = p; } diff --git a/test/sequence/adapt_tpl_struct.cpp b/test/sequence/adapt_tpl_struct.cpp index 13e4446c..0218fbae 100644 --- a/test/sequence/adapt_tpl_struct.cpp +++ b/test/sequence/adapt_tpl_struct.cpp @@ -97,14 +97,14 @@ main() { // conversion from point to vector point p = {5, 3}; - vector v(p); + vector v(p); v = p; } { // conversion from point to list point p = {5, 3}; - list l(p); + list l(p); l = p; } diff --git a/test/sequence/cons.cpp b/test/sequence/cons.cpp index 3bd6437f..8df03a63 100644 --- a/test/sequence/cons.cpp +++ b/test/sequence/cons.cpp @@ -26,6 +26,7 @@ main() { using namespace boost::fusion; using boost::is_same; + namespace fusion = boost::fusion; std::cout << tuple_open('['); std::cout << tuple_close(']'); @@ -39,18 +40,18 @@ main() make_cons(1, make_cons(hello)); BOOST_TEST((*begin(ns) == 1)); - BOOST_TEST((*next(begin(ns)) == hello)); + BOOST_TEST((*fusion::next(begin(ns)) == hello)); *begin(ns) += 1; - *next(begin(ns)) += ' '; + *fusion::next(begin(ns)) += ' '; BOOST_TEST((*begin(ns) == 2)); - BOOST_TEST((*next(begin(ns)) == hello + ' ')); + BOOST_TEST((*fusion::next(begin(ns)) == hello + ' ')); for_each(ns, boost::lambda::_1 += ' '); BOOST_TEST((*begin(ns) == 2 + ' ')); - BOOST_TEST((*next(begin(ns)) == hello + ' ' + ' ')); + BOOST_TEST((*fusion::next(begin(ns)) == hello + ' ' + ' ')); } { diff --git a/test/sequence/define_assoc_struct.cpp b/test/sequence/define_assoc_struct.cpp index bacc0bff..6f6326ec 100644 --- a/test/sequence/define_assoc_struct.cpp +++ b/test/sequence/define_assoc_struct.cpp @@ -75,14 +75,14 @@ main() { // conversion from ns::point to vector ns::point p(5, 3); - vector v(p); + vector v(p); v = p; } { // conversion from ns::point to list ns::point p(5, 3); - list l(p); + list l(p); l = p; } diff --git a/test/sequence/define_assoc_tpl_struct.cpp b/test/sequence/define_assoc_tpl_struct.cpp index 88623bcb..ec3c7f3b 100644 --- a/test/sequence/define_assoc_tpl_struct.cpp +++ b/test/sequence/define_assoc_tpl_struct.cpp @@ -79,14 +79,14 @@ main() { // conversion from point to vector point p(5, 3); - vector v(p); + vector v(p); v = p; } { // conversion from point to list point p(5, 3); - list l(p); + list l(p); l = p; } diff --git a/test/sequence/define_struct.cpp b/test/sequence/define_struct.cpp index 8aa535e8..8d839781 100644 --- a/test/sequence/define_struct.cpp +++ b/test/sequence/define_struct.cpp @@ -72,14 +72,14 @@ main() { // conversion from ns::point to vector ns::point p(5, 3); - vector v(p); + vector v(p); v = p; } { // conversion from ns::point to list ns::point p(5, 3); - list l(p); + list l(p); l = p; } diff --git a/test/sequence/define_tpl_struct.cpp b/test/sequence/define_tpl_struct.cpp index 58c1758b..a2193709 100644 --- a/test/sequence/define_tpl_struct.cpp +++ b/test/sequence/define_tpl_struct.cpp @@ -75,14 +75,14 @@ main() { // conversion from point to vector point p(5, 3); - vector v(p); + vector v(p); v = p; } { // conversion from point to list point p(5, 3); - list l(p); + list l(p); l = p; } diff --git a/test/sequence/iterator_range.cpp b/test/sequence/iterator_range.cpp index d4062840..51288dbd 100644 --- a/test/sequence/iterator_range.cpp +++ b/test/sequence/iterator_range.cpp @@ -28,6 +28,7 @@ int main() { using namespace boost::fusion; + namespace fusion = boost::fusion; std::cout << tuple_open('['); std::cout << tuple_close(']'); @@ -104,9 +105,9 @@ main() BOOST_MPL_ASSERT((boost::is_same::type>::type>::type, char>)); std::cout << deref_data(begin(r)) << std::endl; - std::cout << deref_data(next(begin(r))) << std::endl; + std::cout << deref_data(fusion::next(begin(r))) << std::endl; BOOST_TEST((deref_data(begin(r)) == "foo")); - BOOST_TEST((deref_data(next(begin(r))) == 'x')); + BOOST_TEST((deref_data(fusion::next(begin(r))) == 'x')); } return boost::report_errors(); diff --git a/test/sequence/joint_view.cpp b/test/sequence/joint_view.cpp index e53d333c..900b9a68 100644 --- a/test/sequence/joint_view.cpp +++ b/test/sequence/joint_view.cpp @@ -34,6 +34,7 @@ int main() { using namespace boost::fusion; + namespace fusion = boost::fusion; std::cout << tuple_open('['); std::cout << tuple_close(']'); @@ -175,11 +176,11 @@ main() , float>)); std::cout << deref_data(begin(j)) << std::endl; - std::cout << deref_data(boost::fusion::next(begin(j))) << std::endl; - std::cout << deref_data(next(boost::fusion::next(begin(j)))) << std::endl; + std::cout << deref_data(fusion::next(begin(j))) << std::endl; + std::cout << deref_data(fusion::next(fusion::next(begin(j)))) << std::endl; BOOST_TEST((deref_data(begin(j)) == 0)); - BOOST_TEST((deref_data(boost::fusion::next(begin(j))) == "foo")); - BOOST_TEST((deref_data(next(boost::fusion::next(begin(j)))) == 1.3f)); + BOOST_TEST((deref_data(fusion::next(begin(j))) == "foo")); + BOOST_TEST((deref_data(fusion::next(fusion::next(begin(j)))) == 1.3f)); } return boost::report_errors(); diff --git a/test/sequence/map.cpp b/test/sequence/map.cpp index d4e1cfa3..e419a7e0 100644 --- a/test/sequence/map.cpp +++ b/test/sequence/map.cpp @@ -29,6 +29,7 @@ main() using namespace boost::fusion; using namespace boost; using namespace std; + namespace fusion = boost::fusion; using boost::fusion::pair; using boost::fusion::make_pair; @@ -66,15 +67,15 @@ main() BOOST_STATIC_ASSERT((!result_of::has_key::value)); std::cout << deref_data(begin(m)) << std::endl; - std::cout << deref_data(next(begin(m))) << std::endl; + std::cout << deref_data(fusion::next(begin(m))) << std::endl; BOOST_TEST(deref_data(begin(m)) == 'X'); - BOOST_TEST(deref_data(next(begin(m))) == "Men"); + BOOST_TEST(deref_data(fusion::next(begin(m))) == "Men"); - BOOST_STATIC_ASSERT((is_same::type>::type, int>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type>::type, double>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type, char>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type>::type, std::string>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, double>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type, char>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, std::string>::value)); } { diff --git a/test/sequence/misc.hpp b/test/sequence/misc.hpp index 4c51a18c..c5b58b45 100644 --- a/test/sequence/misc.hpp +++ b/test/sequence/misc.hpp @@ -151,7 +151,7 @@ test() { // testing front & back typedef FUSION_SEQUENCE tup; - tup t(1, 2.2, "Kimpo"); + tup t(1, 2.2f, "Kimpo"); BOOST_TEST(front(t) == 1); #if !defined(FUSION_FORWARD_ONLY) // list has no back diff --git a/test/sequence/set.cpp b/test/sequence/set.cpp index 7be0b078..4a39c89a 100644 --- a/test/sequence/set.cpp +++ b/test/sequence/set.cpp @@ -29,6 +29,7 @@ main() using namespace boost::fusion; using namespace boost; using namespace std; + namespace fusion = boost::fusion; using boost::fusion::pair; using boost::fusion::make_pair; @@ -61,15 +62,15 @@ main() BOOST_STATIC_ASSERT((!result_of::has_key::value)); std::cout << deref_data(begin(m)) << std::endl; - std::cout << deref_data(next(begin(m))) << std::endl; + std::cout << deref_data(fusion::next(begin(m))) << std::endl; BOOST_TEST(deref_data(begin(m)) == 123); - BOOST_TEST(deref_data(next(begin(m))) == "Hola"); + BOOST_TEST(deref_data(fusion::next(begin(m))) == "Hola"); - BOOST_STATIC_ASSERT((is_same::type>::type, int>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type>::type, std::string>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type, int>::value)); - BOOST_STATIC_ASSERT((is_same::type>::type>::type, std::string>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, std::string>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, std::string>::value)); } { diff --git a/test/sequence/tr1_tuple_auto_conv.cpp b/test/sequence/tr1_tuple_auto_conv.cpp index 0c20fa3f..010d4c71 100644 --- a/test/sequence/tr1_tuple_auto_conv.cpp +++ b/test/sequence/tr1_tuple_auto_conv.cpp @@ -48,7 +48,7 @@ namespace Core } // namespace Core -int main(int argc, char* argv[]) +int main() { std::tr1::tuple test = Core::Demo(); return 0;