summaryrefslogtreecommitdiff
path: root/boost/fusion/support/pair.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/support/pair.hpp')
-rw-r--r--boost/fusion/support/pair.hpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/boost/fusion/support/pair.hpp b/boost/fusion/support/pair.hpp
index c547926e9b..fd5d57e687 100644
--- a/boost/fusion/support/pair.hpp
+++ b/boost/fusion/support/pair.hpp
@@ -16,6 +16,7 @@
#include <boost/config.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
@@ -28,48 +29,47 @@ namespace boost { namespace fusion
template <typename First, typename Second>
struct pair
{
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair()
: second() {}
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair(pair const& rhs)
: second(rhs.second) {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair(pair&& rhs)
- : second(std::forward<Second>(rhs.second)) {}
+ : second(BOOST_FUSION_FWD_ELEM(Second, rhs.second)) {}
#endif
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair(typename detail::call_param<Second>::type val)
: second(val) {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-
template <typename Second2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair(Second2&& val
+ , typename boost::disable_if<is_lvalue_reference<Second2> >::type* /* dummy */ = 0
, typename boost::enable_if<is_convertible<Second2, Second> >::type* /*dummy*/ = 0
- ) : second(std::forward<Second2>(val)) {}
-
+ ) : second(BOOST_FUSION_FWD_ELEM(Second, val)) {}
#endif
template <typename Second2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair(pair<First, Second2> const& rhs)
: second(rhs.second) {}
template <typename Second2>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair& operator=(pair<First, Second2> const& rhs)
{
second = rhs.second;
return *this;
}
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair& operator=(pair const& rhs)
{
second = rhs.second;
@@ -77,10 +77,10 @@ namespace boost { namespace fusion
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pair& operator=(pair&& rhs)
{
- second = std::forward<Second>(rhs.second);
+ second = BOOST_FUSION_FWD_ELEM(Second, rhs.second);
return *this;
}
#endif
@@ -113,7 +113,7 @@ namespace boost { namespace fusion
}
template <typename First, typename Second>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::make_pair<First,Second>::type
make_pair(Second const& val)
{
@@ -137,7 +137,7 @@ namespace boost { namespace fusion
}
template <typename First, typename SecondL, typename SecondR>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
operator==(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
{
@@ -145,7 +145,7 @@ namespace boost { namespace fusion
}
template <typename First, typename SecondL, typename SecondR>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
operator!=(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
{
@@ -153,7 +153,7 @@ namespace boost { namespace fusion
}
template <typename First, typename SecondL, typename SecondR>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool
operator<(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
{