source: NonGTP/Boost/boost/spirit/fusion/sequence/detail/tuple_access_result.hpp @ 857

Revision 857, 1.1 KB checked in by igarcia, 18 years ago (diff)
Line 
1/*=============================================================================
2    Copyright (c) 2001-2003 Joel de Guzman
3
4    Use, modification and distribution is subject to the Boost Software
5    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6    http://www.boost.org/LICENSE_1_0.txt)
7==============================================================================*/
8#if !defined(FUSION_SEQUENCE_DETAIL_TUPLE_ACCESS_RESULT_HPP)
9#define FUSION_SEQUENCE_DETAIL_TUPLE_ACCESS_RESULT_HPP
10
11#include <boost/spirit/fusion/detail/config.hpp>
12#include <boost/spirit/fusion/detail/access.hpp>
13#include <boost/type_traits/is_const.hpp>
14#include <boost/mpl/at.hpp>
15#include <boost/mpl/eval_if.hpp>
16
17namespace boost { namespace fusion { namespace detail
18{
19    template <typename Tuple, int N>
20    struct tuple_access_result
21    {
22        typedef mpl::at_c<FUSION_GET_TYPES(Tuple), N> element;
23        typedef typename
24            mpl::eval_if<
25                is_const<Tuple>
26              , cref_result<element>
27              , ref_result<element>
28            >::type
29        type;
30    };
31}}}
32
33#endif
Note: See TracBrowser for help on using the repository browser.