diff --git a/include/boost/fusion/adapted/boost_array/array_iterator.hpp b/include/boost/fusion/adapted/boost_array/array_iterator.hpp index 540cbfed..546d16f0 100644 --- a/include/boost/fusion/adapted/boost_array/array_iterator.hpp +++ b/include/boost/fusion/adapted/boost_array/array_iterator.hpp @@ -18,6 +18,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct random_access_traversal_tag; @@ -102,11 +107,13 @@ namespace boost { namespace fusion return type(); } }; - - BOOST_DELETED_FUNCTION(array_iterator& operator=(array_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { 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 ea30cb55..024d8720 100644 --- a/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp +++ b/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp @@ -45,6 +45,10 @@ namespace boost { namespace fusion template struct boost_tuple_iterator_identity; +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif template struct boost_tuple_iterator : iterator_facade, forward_traversal_tag> @@ -143,10 +147,10 @@ namespace boost { namespace fusion struct equal_to : is_same {}; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(boost_tuple_iterator& operator= (boost_tuple_iterator const&)) }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif template struct boost_tuple_null_iterator diff --git a/include/boost/fusion/adapted/std_array/std_array_iterator.hpp b/include/boost/fusion/adapted/std_array/std_array_iterator.hpp index 4fac5707..eaf45116 100644 --- a/include/boost/fusion/adapted/std_array/std_array_iterator.hpp +++ b/include/boost/fusion/adapted/std_array/std_array_iterator.hpp @@ -19,6 +19,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct random_access_traversal_tag; @@ -99,9 +104,11 @@ namespace boost { namespace fusion return type(); } }; - - BOOST_DELETED_FUNCTION(std_array_iterator& operator=(std_array_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp b/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp index a3421e0f..c84c8470 100644 --- a/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp +++ b/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp @@ -17,6 +17,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct random_access_traversal_tag; @@ -107,6 +112,10 @@ namespace boost { namespace fusion }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index 1db1a2ef..af711015 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -326,6 +326,9 @@ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ \ + BOOST_FUSION_PUSH_WARNINGS \ + BOOST_FUSION_DISABLE_MSVC_WARNING(4512) \ + \ template \ struct BOOST_FUSION_ITERATOR_NAME(NAME) \ : boost::fusion::iterator_facade< \ @@ -418,7 +421,10 @@ return type(it.seq_); \ } \ }; \ - }; + }; \ + \ + BOOST_FUSION_POP_WARNINGS \ + /**/ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ diff --git a/include/boost/fusion/adapted/struct/detail/proxy_type.hpp b/include/boost/fusion/adapted/struct/detail/proxy_type.hpp index 1679561b..e0645173 100644 --- a/include/boost/fusion/adapted/struct/detail/proxy_type.hpp +++ b/include/boost/fusion/adapted/struct/detail/proxy_type.hpp @@ -19,6 +19,9 @@ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ \ + BOOST_FUSION_PUSH_WARNINGS \ + BOOST_FUSION_DISABLE_MSVC_WARNING(4512) \ + \ struct NAME \ { \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ @@ -27,10 +30,10 @@ {} \ \ WRAPPED_TYPE& obj; \ - \ - BOOST_DELETED_FUNCTION(NAME& operator= (NAME const&)) \ }; \ \ + BOOST_FUSION_POP_WARNINGS \ + \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) #define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE( \ diff --git a/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp index 350bff75..663c6fed 100644 --- a/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp @@ -14,6 +14,10 @@ namespace boost { namespace fusion { namespace detail { +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif template struct segmented_fold_fun { @@ -37,6 +41,9 @@ namespace boost { namespace fusion { namespace detail } }; }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif // The default implementation of this lives in detail/fold.hpp template diff --git a/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp b/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp index 7b299f86..404ba2a0 100644 --- a/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp @@ -13,6 +13,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { namespace detail { template @@ -49,4 +54,8 @@ namespace boost { namespace fusion { namespace detail } }}} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/algorithm/transformation/pop_back.hpp b/include/boost/fusion/algorithm/transformation/pop_back.hpp index 2f55fa5e..9a7e7547 100644 --- a/include/boost/fusion/algorithm/transformation/pop_back.hpp +++ b/include/boost/fusion/algorithm/transformation/pop_back.hpp @@ -18,6 +18,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template @@ -168,5 +173,9 @@ namespace boost { namespace fusion } }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/container/deque/deque_iterator.hpp b/include/boost/fusion/container/deque/deque_iterator.hpp index b0335e5f..66fd635d 100644 --- a/include/boost/fusion/container/deque/deque_iterator.hpp +++ b/include/boost/fusion/container/deque/deque_iterator.hpp @@ -20,6 +20,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct bidirectional_traversal_tag; @@ -110,13 +115,14 @@ namespace boost { namespace fusion { {}; Seq& seq_; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(deque_iterator& operator= (deque_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/container/list/cons_iterator.hpp b/include/boost/fusion/container/list/cons_iterator.hpp index 5c0491db..f6655a70 100644 --- a/include/boost/fusion/container/list/cons_iterator.hpp +++ b/include/boost/fusion/container/list/cons_iterator.hpp @@ -26,6 +26,10 @@ namespace boost { namespace fusion template struct cons_iterator_identity; +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif template struct cons_iterator : iterator_base > { @@ -41,10 +45,10 @@ namespace boost { namespace fusion : cons(in_cons) {} cons_type& cons; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(cons_iterator& operator= (cons_iterator const&)) }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif struct nil_iterator : iterator_base { diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp index 3db7344b..3ae0decd 100644 --- a/include/boost/fusion/container/map/map_iterator.hpp +++ b/include/boost/fusion/container/map/map_iterator.hpp @@ -17,6 +17,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct random_access_traversal_tag; @@ -155,13 +160,13 @@ namespace boost { namespace fusion {}; Seq& seq_; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(map_iterator& operator= (map_iterator const&)) }; - }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/container/vector/vector_iterator.hpp b/include/boost/fusion/container/vector/vector_iterator.hpp index 0e04b345..62219766 100644 --- a/include/boost/fusion/container/vector/vector_iterator.hpp +++ b/include/boost/fusion/container/vector/vector_iterator.hpp @@ -19,6 +19,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct vector_iterator_tag; @@ -41,17 +46,14 @@ namespace boost { namespace fusion vector_iterator(Vector& in_vec) : vec(in_vec) {} - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector_iterator(vector_iterator const& rhs) - : vec(rhs.vec) {} - Vector& vec; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(vector_iterator& operator= (vector_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/iterator/detail/segment_sequence.hpp b/include/boost/fusion/iterator/detail/segment_sequence.hpp index 8b8d5c13..8b45cc13 100644 --- a/include/boost/fusion/iterator/detail/segment_sequence.hpp +++ b/include/boost/fusion/iterator/detail/segment_sequence.hpp @@ -13,6 +13,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { namespace detail { struct segment_sequence_tag {}; @@ -36,6 +41,10 @@ namespace boost { namespace fusion { namespace detail }; } +#ifdef _MSC_VER +# pragma warning(pop) +#endif + namespace extension { template diff --git a/include/boost/fusion/iterator/iterator_adapter.hpp b/include/boost/fusion/iterator/iterator_adapter.hpp index de8938f6..999d57b2 100644 --- a/include/boost/fusion/iterator/iterator_adapter.hpp +++ b/include/boost/fusion/iterator/iterator_adapter.hpp @@ -19,6 +19,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { template class string_ios_manip { @@ -143,10 +147,10 @@ namespace boost { namespace fusion } Stream& stream; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(string_ios_manip& operator= (string_ios_manip const&)) }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif } // detail diff --git a/include/boost/fusion/support/config.hpp b/include/boost/fusion/support/config.hpp index dc614d9d..7c87adeb 100644 --- a/include/boost/fusion/support/config.hpp +++ b/include/boost/fusion/support/config.hpp @@ -127,4 +127,14 @@ namespace boost { namespace fusion { namespace detail # define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED BOOST_NOEXCEPT #endif +#ifdef _MSC_VER +# define BOOST_FUSION_PUSH_WARNINGS __pragma(warning(push)) +# define BOOST_FUSION_POP_WARNINGS __pragma(warning(pop)) +# define BOOST_FUSION_DISABLE_MSVC_WARNING(num) __pragma(warning(disable : num)) +#else +# define BOOST_FUSION_PUSH_WARNINGS +# define BOOST_FUSION_POP_WARNINGS +# define BOOST_FUSION_DISABLE_MSVC_WARNING(num) +#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 b9b7e7fc..c4e05e8d 100644 --- a/include/boost/fusion/view/filter_view/filter_view.hpp +++ b/include/boost/fusion/view/filter_view/filter_view.hpp @@ -22,6 +22,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct filter_view_tag; @@ -51,22 +56,18 @@ namespace boost { namespace fusion : seq(in_seq) {} - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - filter_view(filter_view const& rhs) - : seq(rhs.seq) - {} - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED first_type first() const { return fusion::begin(seq); } BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED last_type last() const { return fusion::end(seq); } typename mpl::if_, Sequence, Sequence&>::type seq; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(filter_view& operator= (filter_view const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif 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 05eda69b..7a907f50 100644 --- a/include/boost/fusion/view/filter_view/filter_view_iterator.hpp +++ b/include/boost/fusion/view/filter_view/filter_view_iterator.hpp @@ -26,6 +26,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct filter_view_iterator_tag; @@ -59,17 +64,14 @@ namespace boost { namespace fusion filter_iterator(First const& in_first) : first(filter::iter_call(first_converter::call(in_first))) {} - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - filter_iterator(filter_iterator const& rhs) - : first(rhs.first) {} - first_type first; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(filter_iterator& operator= (filter_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/view/flatten_view/flatten_view.hpp b/include/boost/fusion/view/flatten_view/flatten_view.hpp index 401f65dc..4512a137 100644 --- a/include/boost/fusion/view/flatten_view/flatten_view.hpp +++ b/include/boost/fusion/view/flatten_view/flatten_view.hpp @@ -19,6 +19,10 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -52,6 +56,10 @@ namespace boost { namespace fusion }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + namespace boost { namespace fusion { namespace extension { template<> diff --git a/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp b/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp index be115d91..73d2490b 100644 --- a/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp +++ b/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp @@ -19,6 +19,10 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -46,6 +50,10 @@ namespace boost { namespace fusion }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + namespace boost { namespace fusion { namespace detail { template diff --git a/include/boost/fusion/view/identity_view/identity_view.hpp b/include/boost/fusion/view/identity_view/identity_view.hpp index e7efdb7a..4cd0c093 100644 --- a/include/boost/fusion/view/identity_view/identity_view.hpp +++ b/include/boost/fusion/view/identity_view/identity_view.hpp @@ -28,6 +28,10 @@ namespace boost { }; } +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { template struct identity_view : transform_view @@ -39,5 +43,8 @@ namespace boost { namespace fusion { : base_type(in_seq, detail::identity()) {} }; }} +#ifdef _MSC_VER +# 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 03e38d69..1cf6d0d5 100644 --- a/include/boost/fusion/view/joint_view/joint_view.hpp +++ b/include/boost/fusion/view/joint_view/joint_view.hpp @@ -25,6 +25,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct joint_view_tag; @@ -69,15 +74,16 @@ namespace boost { namespace fusion BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED concat_last_type concat_last() const { return fusion::end(seq2); } - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(joint_view& operator= (joint_view const&)) - private: typename mpl::if_, Sequence1, Sequence1&>::type seq1; typename mpl::if_, Sequence2, Sequence2&>::type seq2; }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif 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 f6db3091..1b446189 100644 --- a/include/boost/fusion/view/joint_view/joint_view_iterator.hpp +++ b/include/boost/fusion/view/joint_view/joint_view_iterator.hpp @@ -20,6 +20,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct joint_view_iterator_tag; @@ -49,12 +54,13 @@ namespace boost { namespace fusion first_type first; concat_type concat; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(joint_view_iterator& operator= (joint_view_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/view/nview/nview_iterator.hpp b/include/boost/fusion/view/nview/nview_iterator.hpp index 79c82dd9..5e5cea27 100644 --- a/include/boost/fusion/view/nview/nview_iterator.hpp +++ b/include/boost/fusion/view/nview/nview_iterator.hpp @@ -26,6 +26,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct nview_iterator_tag; @@ -46,13 +51,14 @@ namespace boost { namespace fusion : seq(in_seq) {} Sequence& seq; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(nview_iterator& operator= (nview_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/view/repetitive_view/repetitive_view.hpp b/include/boost/fusion/view/repetitive_view/repetitive_view.hpp index 71dc51bc..615fa581 100644 --- a/include/boost/fusion/view/repetitive_view/repetitive_view.hpp +++ b/include/boost/fusion/view/repetitive_view/repetitive_view.hpp @@ -18,6 +18,10 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif namespace boost { namespace fusion { @@ -43,11 +47,12 @@ namespace boost { namespace fusion : seq(in_seq) {} stored_seq_type seq; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(repetitive_view& operator= (repetitive_view const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif 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 775249ff..842d3fb1 100644 --- a/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp +++ b/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp @@ -19,6 +19,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct repetitive_view_iterator_tag; @@ -46,12 +51,13 @@ namespace boost { namespace fusion Sequence& seq; pos_type pos; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(repetitive_view_iterator& operator= (repetitive_view_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/view/reverse_view/reverse_view.hpp b/include/boost/fusion/view/reverse_view/reverse_view.hpp index 0aa3d106..cde4206f 100644 --- a/include/boost/fusion/view/reverse_view/reverse_view.hpp +++ b/include/boost/fusion/view/reverse_view/reverse_view.hpp @@ -27,6 +27,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct reverse_view_tag; @@ -60,12 +65,13 @@ namespace boost { namespace fusion BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED last_type last() const { return fusion::end(seq); } typename mpl::if_, Sequence, Sequence&>::type seq; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(reverse_view& operator= (reverse_view const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif 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 0a582f40..02307f5a 100644 --- a/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp +++ b/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp @@ -24,6 +24,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct reverse_view_iterator_tag; @@ -47,12 +52,13 @@ namespace boost { namespace fusion : first(converter::call(in_first)) {} first_type first; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(reverse_view_iterator& operator= (reverse_view_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { 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 0de6c842..38c25ed5 100644 --- a/include/boost/fusion/view/single_view/single_view_iterator.hpp +++ b/include/boost/fusion/view/single_view/single_view_iterator.hpp @@ -20,6 +20,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct single_view_iterator_tag; @@ -40,11 +45,13 @@ namespace boost { namespace fusion : view(in_view) {} SingleView& view; - - BOOST_DELETED_FUNCTION(single_view_iterator& operator=(single_view_iterator const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/view/transform_view/detail/deref_data_impl.hpp b/include/boost/fusion/view/transform_view/detail/deref_data_impl.hpp index 3eb325a4..83ea236a 100644 --- a/include/boost/fusion/view/transform_view/detail/deref_data_impl.hpp +++ b/include/boost/fusion/view/transform_view/detail/deref_data_impl.hpp @@ -10,6 +10,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace boost { namespace fusion { diff --git a/include/boost/fusion/view/transform_view/transform_view.hpp b/include/boost/fusion/view/transform_view/transform_view.hpp index f0633018..901fe362 100644 --- a/include/boost/fusion/view/transform_view/transform_view.hpp +++ b/include/boost/fusion/view/transform_view/transform_view.hpp @@ -27,6 +27,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { struct void_; @@ -75,9 +80,6 @@ namespace boost { namespace fusion transform_type f; typename mpl::if_, Sequence1, Sequence1&>::type seq1; typename mpl::if_, Sequence2, Sequence2&>::type seq2; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(transform_view& operator= (transform_view const&)) }; // Unary Version @@ -111,12 +113,13 @@ namespace boost { namespace fusion last_type last() const { return fusion::end(seq); } typename mpl::if_, Sequence, Sequence&>::type seq; transform_type f; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(transform_view& operator= (transform_view const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif diff --git a/include/boost/fusion/view/transform_view/transform_view_iterator.hpp b/include/boost/fusion/view/transform_view/transform_view_iterator.hpp index 071cba8e..ba5b7c9b 100644 --- a/include/boost/fusion/view/transform_view/transform_view_iterator.hpp +++ b/include/boost/fusion/view/transform_view/transform_view_iterator.hpp @@ -23,6 +23,11 @@ #include #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif + namespace boost { namespace fusion { // Unary Version @@ -44,9 +49,6 @@ namespace boost { namespace fusion first_type first; transform_type f; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(transform_view_iterator& operator= (transform_view_iterator const&)) }; // Binary Version @@ -71,12 +73,13 @@ namespace boost { namespace fusion first1_type first1; first2_type first2; transform_type f; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(transform_view_iterator2& operator= (transform_view_iterator2 const&)) }; }} +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/test/sequence/segmented_iterator_range.cpp b/test/sequence/segmented_iterator_range.cpp index df49407a..236a7e27 100644 --- a/test/sequence/segmented_iterator_range.cpp +++ b/test/sequence/segmented_iterator_range.cpp @@ -21,6 +21,10 @@ #include #include "tree.hpp" +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated. +#endif struct ostream_fun { ostream_fun(std::ostream &sout) @@ -34,6 +38,9 @@ struct ostream_fun private: std::ostream & sout_; }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif template void