source: NonGTP/Boost/boost/spirit/fusion/sequence/detail/sequence_base.hpp @ 857

Revision 857, 1.1 KB checked in by igarcia, 19 years ago (diff)
Line 
1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3    Copyright (c) 2004 Peder Holt
4
5    Use, modification and distribution is subject to the Boost Software
6    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7    http://www.boost.org/LICENSE_1_0.txt)
8==============================================================================*/
9#if !defined(FUSION_SEQUENCE_DETAIL_SEQUENCE_BASE_HPP)
10#define FUSION_SEQUENCE_DETAIL_SEQUENCE_BASE_HPP
11
12namespace boost { namespace fusion
13{
14    struct sequence_root {};
15
16    template <typename Sequence>
17    struct sequence_base : sequence_root
18    {
19        Sequence const&
20        cast() const;
21
22        Sequence&
23        cast();
24    };
25
26    template <typename Sequence>
27    Sequence const&
28    sequence_base<Sequence>::cast() const
29    {
30        return static_cast<Sequence const&>(*this);
31    }
32
33    template <typename Sequence>
34    Sequence&
35    sequence_base<Sequence>::cast()
36    {
37        return static_cast<Sequence&>(*this);
38    }
39
40}}
41
42#endif
Note: See TracBrowser for help on using the repository browser.