]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/support/sequence_base.hpp
1d436ef165f111b103ba253742672028d3f06200
[rsem.git] / boost / fusion / support / sequence_base.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2006 Joel de Guzman
3     Copyright (c) 2007 Tobias Schwinger
4
5     Distributed under the Boost Software License, Version 1.0. (See accompanying
6     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_SEQUENCE_BASE_04182005_0737)
9 #define FUSION_SEQUENCE_BASE_04182005_0737
10
11 #include <boost/mpl/begin_end_fwd.hpp>
12
13 namespace boost { namespace fusion
14 {
15     struct sequence_root {};
16
17     template <typename Sequence>
18     struct sequence_base : sequence_root
19     {
20         Sequence const&
21         derived() const
22         {
23             return static_cast<Sequence const&>(*this);
24         }
25
26         Sequence&
27         derived()
28         {
29             return static_cast<Sequence&>(*this);
30         }
31     };
32
33     struct fusion_sequence_tag;
34 }}
35
36 namespace boost { namespace mpl
37 {
38     // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
39     // is not an MPL sequence by returning mpl::void_.
40     // In other words: Fusion Sequences are always MPL Sequences, but they can
41     // be incompletely defined.
42     template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
43 }}
44
45 #endif