forked from boostorg/fusion
Fix for fusion pair to make the compiler select the proper copy
constructor and remove a viable, but wrong, constructor. test added.
This commit is contained in:
@ -37,9 +37,11 @@ namespace boost { namespace fusion
|
||||
: second(rhs.second) {}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
pair(pair&& rhs)
|
||||
: second(std::forward<Second>(rhs.second)) {}
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
@ -50,7 +52,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Second2>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
pair(Second2&& val
|
||||
explicit pair(Second2&& val
|
||||
, typename boost::enable_if<is_convertible<Second2, Second> >::type* /*dummy*/ = 0
|
||||
) : second(std::forward<Second2>(val)) {}
|
||||
|
||||
|
Reference in New Issue
Block a user