File indexing completed on 2025-12-16 09:47:51
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined (BOOST_FUSION_PAIR_TIE_20060812_2058)
0009 #define BOOST_FUSION_PAIR_TIE_20060812_2058
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/type_traits/is_const.hpp>
0013 #include <boost/utility/enable_if.hpp>
0014
0015 namespace boost { namespace fusion {
0016
0017 template<typename Key, typename T>
0018 struct pair;
0019
0020 namespace result_of
0021 {
0022 template<typename Key, typename T>
0023 struct pair_tie
0024 {
0025 typedef fusion::pair<Key, T&> type;
0026 };
0027 }
0028
0029 template<typename Key, typename T>
0030 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0031 typename disable_if<is_const<T>, typename result_of::pair_tie<Key, T>::type>::type
0032 pair_tie(T& t)
0033 {
0034 return typename result_of::pair_tie<Key, T>::type(t);
0035 }
0036
0037 template<typename Key, typename T>
0038 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0039 typename result_of::pair_tie<Key, T const>::type
0040 pair_tie(T const& t)
0041 {
0042 return typename result_of::pair_tie<Key, T const>::type(t);
0043 }
0044 }}
0045
0046 #endif