Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:47:51

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
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