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_END_04052005_1141)
8 #define FUSION_END_04052005_1141
10 #include <boost/fusion/support/tag_of.hpp>
12 namespace boost { namespace fusion
15 struct sequence_facade_tag;
16 struct boost_tuple_tag; // boost::tuples::tuple tag
17 struct boost_array_tag; // boost::array tag
18 struct mpl_sequence_tag; // mpl sequence tag
19 struct std_pair_tag; // std::pair tag
23 template <typename Tag>
26 template <typename Sequence>
31 struct end_impl<sequence_facade_tag>
33 template <typename Sequence>
34 struct apply : Sequence::template end<Sequence> {};
38 struct end_impl<boost_tuple_tag>;
41 struct end_impl<boost_array_tag>;
44 struct end_impl<mpl_sequence_tag>;
47 struct end_impl<std_pair_tag>;
52 template <typename Sequence>
54 : extension::end_impl<typename detail::tag_of<Sequence>::type>::
55 template apply<Sequence>
59 template <typename Sequence>
60 inline typename result_of::end<Sequence>::type const
63 return result_of::end<Sequence>::call(seq);
66 template <typename Sequence>
67 inline typename result_of::end<Sequence const>::type const
68 end(Sequence const& seq)
70 return result_of::end<Sequence const>::call(seq);