mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 20:17:32 +02:00
Merge pull request #161 from boostorg/regression/msvc-defects
Fixed a regression with msvc 10/11/12
This commit is contained in:
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
vector(U0 && arg0
|
||||
, typename boost::disable_if_c<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
)
|
||||
: vec(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
@ -269,7 +269,7 @@ namespace boost { namespace fusion
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
vector(U0 && arg0
|
||||
, typename boost::disable_if_c<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
)
|
||||
: vec(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
@ -449,7 +449,7 @@ namespace boost { namespace fusion
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
vector(U0 && arg0
|
||||
, typename boost::disable_if_c<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
)
|
||||
: vec(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
@ -629,7 +629,7 @@ namespace boost { namespace fusion
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
vector(U0 && arg0
|
||||
, typename boost::disable_if_c<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
)
|
||||
: vec(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
@ -809,7 +809,7 @@ namespace boost { namespace fusion
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
vector(U0 && arg0
|
||||
, typename boost::disable_if_c<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
)
|
||||
: vec(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
@ -989,7 +989,7 @@ namespace boost { namespace fusion
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -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 <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/remove_cv_ref.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
|
||||
@ -178,7 +180,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::disable_if_c<
|
||||
boost::is_same<vector const, typename boost::remove_reference<T>::type const>::value
|
||||
boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
|
||||
, vector&
|
||||
>::type
|
||||
operator=(T&& rhs)
|
||||
|
@ -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<boost::is_same<vector const, typename boost::remove_reference<U0>::type const>::value, detail::enabler_>::type = detail::enabler
|
||||
, typename boost::disable_if_c<boost::is_same<vector, typename boost::remove_cv_ref<U0>::type>::value, detail::enabler_>::type = detail::enabler
|
||||
#endif
|
||||
)
|
||||
: vec(BOOST_PP_ENUM(M, FUSION_FORWARD_CTOR_FORWARD, arg)) {}
|
||||
|
@ -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 ]
|
||||
|
||||
|
16
test/sequence/github-159.cpp
Normal file
16
test/sequence/github-159.cpp
Normal file
@ -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 <boost/fusion/container/vector/vector.hpp>
|
||||
#include <boost/type.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::fusion::vector<int, float> v1;
|
||||
boost::fusion::vector<int, float> v2(v1);
|
||||
v1 = v2;
|
||||
}
|
Reference in New Issue
Block a user