1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
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_VALUE_AT_05052005_0229)
8 #define FUSION_VALUE_AT_05052005_0229
10 #include <boost/mpl/int.hpp>
11 #include <boost/fusion/support/tag_of.hpp>
13 namespace boost { namespace fusion
16 struct sequence_facade_tag;
17 struct boost_tuple_tag; // boost::tuples::tuple tag
18 struct boost_array_tag; // boost::array tag
19 struct mpl_sequence_tag; // mpl sequence tag
20 struct std_pair_tag; // std::pair tag
24 template <typename Tag>
27 template <typename Sequence, typename N>
32 struct value_at_impl<sequence_facade_tag>
34 template <typename Sequence, typename N>
35 struct apply : Sequence::template value_at<Sequence, N> {};
39 struct value_at_impl<boost_tuple_tag>;
42 struct value_at_impl<boost_array_tag>;
45 struct value_at_impl<mpl_sequence_tag>;
48 struct value_at_impl<std_pair_tag>;
53 template <typename Sequence, typename N>
55 : extension::value_at_impl<typename detail::tag_of<Sequence>::type>::
56 template apply<Sequence, N>
59 template <typename Sequence, int N>
61 : fusion::result_of::value_at<Sequence, mpl::int_<N> >