]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/support/sequence_base.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / support / sequence_base.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 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     namespace detail
16     {
17         struct from_sequence_convertible_type
18         {};
19     }
20
21     template <typename Sequence>
22     struct sequence_base
23     {
24         Sequence const&
25         derived() const
26         {
27             return static_cast<Sequence const&>(*this);
28         }
29
30         Sequence&
31         derived()
32         {
33             return static_cast<Sequence&>(*this);
34         }
35
36         operator detail::from_sequence_convertible_type()const
37         {
38             return detail::from_sequence_convertible_type();
39         }
40     };
41
42     struct fusion_sequence_tag;
43 }}
44
45 namespace boost { namespace mpl
46 {
47     // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
48     // is not an MPL sequence by returning mpl::void_.
49     // In other words: Fusion Sequences are always MPL Sequences, but they can
50     // be incompletely defined.
51     template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
52 }}
53
54 #endif