1 /*=============================================================================
2 Copyright (c) 2001-2011 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_AT_IMPL_05042005_0741)
8 #define FUSION_AT_IMPL_05042005_0741
10 #include <boost/fusion/support/detail/access.hpp>
11 #include <boost/type_traits/is_const.hpp>
12 #include <boost/mpl/at.hpp>
13 #include <boost/mpl/int.hpp>
15 namespace boost { namespace fusion
21 template <typename Tag>
25 struct at_impl<vector_tag>
27 template <typename Sequence, typename N>
30 typedef typename mpl::at<typename Sequence::types, N>::type element;
31 typedef typename detail::ref_result<element>::type type;
36 return v.at_impl(N());
40 template <typename Sequence, typename N>
41 struct apply <Sequence const, N>
43 typedef typename mpl::at<typename Sequence::types, N>::type element;
44 typedef typename detail::cref_result<element>::type type;
47 call(Sequence const& v)
49 return v.at_impl(N());