]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | //----------------------------------------------------------------------------- |
2 | // boost variant/detail/over_sequence.hpp header file | |
3 | // See http://www.boost.org for updates, documentation, and revision history. | |
4 | //----------------------------------------------------------------------------- | |
5 | // | |
6 | // Copyright (c) 2003 | |
7 | // Eric Friedman | |
8 | // | |
9 | // Portions Copyright (C) 2002 David Abrahams | |
10 | // | |
11 | // Distributed under the Boost Software License, Version 1.0. (See | |
12 | // accompanying file LICENSE_1_0.txt or copy at | |
13 | // http://www.boost.org/LICENSE_1_0.txt) | |
14 | ||
15 | #ifndef BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP | |
16 | #define BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP | |
17 | ||
18 | #include <boost/mpl/aux_/config/ctps.hpp> | |
19 | ||
20 | ||
21 | namespace boost { | |
22 | namespace detail { namespace variant { | |
23 | ||
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | // (detail) class over_sequence | |
26 | // | |
27 | // Wrapper used to indicate bounded types for variant are from type sequence. | |
28 | // | |
29 | template <typename Types> | |
30 | struct over_sequence | |
31 | { | |
32 | typedef Types type; | |
33 | }; | |
34 | ||
35 | /////////////////////////////////////////////////////////////////////////////// | |
36 | // (detail) metafunction is_over_sequence (modeled on code by David Abrahams) | |
37 | // | |
38 | // Indicates whether the specified type is of form over_sequence<...> or not. | |
39 | // | |
40 | ||
41 | ||
42 | template <typename T> | |
43 | struct is_over_sequence | |
44 | : mpl::false_ | |
45 | { | |
46 | }; | |
47 | ||
48 | template <typename Types> | |
49 | struct is_over_sequence< over_sequence<Types> > | |
50 | : mpl::true_ | |
51 | { | |
52 | }; | |
53 | ||
54 | ||
55 | }} // namespace detail::variant | |
56 | } // namespace boost | |
57 | ||
58 | #endif // BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP |