From 5fd8c360796499181ac0136348a8f18060e1696b Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Thu, 23 Nov 2017 22:27:59 +0900 Subject: [PATCH 1/3] Added test for GitHub issue #159 --- test/Jamfile | 1 + test/sequence/github-159.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/sequence/github-159.cpp diff --git a/test/Jamfile b/test/Jamfile index e8d17be0..c9b87da4 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -219,6 +219,7 @@ project : [ requires cxx11_variadic_templates cxx11_hdr_tuple ] ] [ run sequence/ref_vector.cpp ] [ run sequence/flatten_view.cpp ] + [ compile sequence/github-159.cpp ] [ compile sequence/size.cpp ] diff --git a/test/sequence/github-159.cpp b/test/sequence/github-159.cpp new file mode 100644 index 00000000..e21d80c5 --- /dev/null +++ b/test/sequence/github-159.cpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2017 Kohei Takahashi + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include + +int main() +{ + boost::fusion::vector v1; + boost::fusion::vector v2(v1); + v1 = v2; +} From 4eda5454058b480858f6d227787356fb1bfc7c29 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Thu, 23 Nov 2017 22:48:11 +0900 Subject: [PATCH 2/3] Fixed a regression with msvc 10/11/12 defect --- include/boost/fusion/container/vector/detail/cpp03/vector.hpp | 4 +++- .../container/vector/detail/cpp03/vector_forward_ctor.hpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp index 33b87bfb..f5c3024e 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/vector.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2017 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -22,6 +23,7 @@ #include #include #include +#include #include #include @@ -178,7 +180,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs) diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp index e0f9d83c..3422e4b9 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp @@ -66,7 +66,7 @@ FUSION_HASH endif #endif vector(BOOST_PP_ENUM_BINARY_PARAMS(M, U, && arg) #if M == 1 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler #endif ) : vec(BOOST_PP_ENUM(M, FUSION_FORWARD_CTOR_FORWARD, arg)) {} From b12c6b6af6f7f683975adb7e0379cece89059e9c Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Thu, 23 Nov 2017 22:59:02 +0900 Subject: [PATCH 3/3] Regenerate preprocessed files. --- .../container/vector/detail/cpp03/preprocessed/vvector10.hpp | 4 ++-- .../container/vector/detail/cpp03/preprocessed/vvector20.hpp | 4 ++-- .../container/vector/detail/cpp03/preprocessed/vvector30.hpp | 4 ++-- .../container/vector/detail/cpp03/preprocessed/vvector40.hpp | 4 ++-- .../container/vector/detail/cpp03/preprocessed/vvector50.hpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp index 531b4fd2..12b7a570 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp @@ -66,7 +66,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED explicit vector(U0 && arg0 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler ) : vec(std::forward( arg0)) {} # endif @@ -269,7 +269,7 @@ namespace boost { namespace fusion template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs) diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp index 7f64d392..9c64ef05 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp @@ -66,7 +66,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED explicit vector(U0 && arg0 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler ) : vec(std::forward( arg0)) {} # endif @@ -449,7 +449,7 @@ namespace boost { namespace fusion template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs) diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp index b35c17ae..9df40b53 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp @@ -66,7 +66,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED explicit vector(U0 && arg0 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler ) : vec(std::forward( arg0)) {} # endif @@ -629,7 +629,7 @@ namespace boost { namespace fusion template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs) diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp index ccac354d..5da47eeb 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp @@ -66,7 +66,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED explicit vector(U0 && arg0 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler ) : vec(std::forward( arg0)) {} # endif @@ -809,7 +809,7 @@ namespace boost { namespace fusion template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs) diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp index 16d8f0cc..47e878bc 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp @@ -66,7 +66,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED explicit vector(U0 && arg0 - , typename boost::disable_if_c::type const>::value, detail::enabler_>::type = detail::enabler + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler ) : vec(std::forward( arg0)) {} # endif @@ -989,7 +989,7 @@ namespace boost { namespace fusion template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename boost::disable_if_c< - boost::is_same::type const>::value + boost::is_same::type>::value , vector& >::type operator=(T&& rhs)