From bac5e1b5c574931e9d391afc319555982803e523 Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Thu, 26 Oct 2006 07:45:43 +0000 Subject: [PATCH] adds result metafunction for make_pair and pair members [SVN r35748] --- include/boost/fusion/support/pair.hpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index e69c631c..8cbc841d 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2005 Joel de Guzman + Copyright (c) 2006 Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -40,8 +41,30 @@ namespace boost { namespace fusion Second second; }; + namespace result_of + { + template + struct make_pair + { + typedef fusion::pair::type> type; + }; + + template + struct first + { + typedef typename Pair::first_type type; + }; + + template + struct second + { + typedef typename Pair::second_type type; + }; + } + template - inline pair::type> + inline typename result_of::make_pair::type make_pair(Second const& val) { return pair::type>(val);