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

Revision 857, 1.7 KB checked in by igarcia, 18 years ago (diff)
Line 
1/*=============================================================================
2    Copyright (c) 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_AT_TRAITS_HPP)
9#define FUSION_SEQUENCE_DETAIL_TUPLE_AT_TRAITS_HPP
10
11#include <boost/spirit/fusion/detail/config.hpp>
12#include <boost/spirit/fusion/detail/access.hpp>
13#include <boost/spirit/fusion/sequence/detail/tuple_access_result.hpp>
14
15namespace boost { namespace fusion
16{
17    struct tuple_tag;
18
19    namespace detail
20    {
21        template <int N>
22        struct tuple_access;
23    }
24
25    namespace detail
26    {
27        template <typename Sequence, int N>
28        struct tuple_at_impl
29        {
30            typedef BOOST_DEDUCED_TYPENAME
31                boost::fusion::detail::tuple_access_result<Sequence, N>::type
32            type;
33
34            static type
35            call(Sequence& t);
36        };
37
38        template <typename Sequence, int N>
39        inline typename tuple_at_impl<Sequence, N>::type
40        tuple_at_impl<Sequence, N>::call(Sequence& t)
41        {
42            return detail::tuple_access<N>::get(t);
43        }
44    }
45
46    namespace meta
47    {
48        template <typename Tag>
49        struct at_impl;
50
51        template <>
52        struct at_impl<tuple_tag>
53        {
54            template <typename Sequence, int N>
55            struct apply : detail::tuple_at_impl<Sequence, N> {};
56        };
57    }
58}}
59
60#endif
Note: See TracBrowser for help on using the repository browser.