1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #if !defined(FUSION_CONS_TIE_07182005_0854) 8 #define FUSION_CONS_TIE_07182005_0854 9 10 #include <boost/fusion/support/config.hpp> 11 #include <boost/fusion/container/list/cons.hpp> 12 13 namespace boost { namespace fusion 14 { 15 struct nil_; 16 17 namespace result_of 18 { 19 template <typename Car, typename Cdr = nil_> 20 struct cons_tie 21 { 22 typedef cons<Car&, Cdr> type; 23 }; 24 } 25 26 // $$$ do we really want a cons_tie? $$$ 27 template <typename Car> 28 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 29 inline cons<Car&> cons_tie(Car & car)30 cons_tie(Car& car) 31 { 32 return cons<Car&>(car); 33 } 34 35 // $$$ do we really want a cons_tie? $$$ 36 template <typename Car, typename Cdr> 37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 38 inline cons<Car&, Cdr> cons_tie(Car & car,Cdr const & cdr)39 cons_tie(Car& car, Cdr const& cdr) 40 { 41 return cons<Car&, Cdr>(car, cdr); 42 } 43 }} 44 45 #endif 46 47