| 1 | |
|---|---|
| 2 | #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED |
| 3 | #define BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED |
| 4 | |
| 5 | // Copyright Aleksey Gurtovoy 2004 |
| 6 | // Copyright Alexander Nasonov 2004 |
| 7 | // |
| 8 | // Distributed under the Boost Software License, Version 1.0. |
| 9 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 10 | // http://www.boost.org/LICENSE_1_0.txt) |
| 11 | // |
| 12 | // See http://www.boost.org/libs/mpl for documentation. |
| 13 | |
| 14 | // $Id$ |
| 15 | // $Date$ |
| 16 | // $Revision$ |
| 17 | |
| 18 | #include <boost/mpl/size_fwd.hpp> |
| 19 | #include <boost/mpl/int.hpp> |
| 20 | #include <boost/mpl/iterator_tags.hpp> |
| 21 | |
| 22 | namespace boost { namespace mpl { |
| 23 | |
| 24 | struct empty_sequence |
| 25 | { |
| 26 | struct tag; |
| 27 | typedef empty_sequence type; |
| 28 | struct begin { typedef random_access_iterator_tag category; }; |
| 29 | typedef begin end; |
| 30 | }; |
| 31 | |
| 32 | template<> |
| 33 | struct size_impl<empty_sequence::tag> |
| 34 | { |
| 35 | template< typename Sequence > struct apply |
| 36 | : int_<0> |
| 37 | { |
| 38 | }; |
| 39 | }; |
| 40 | |
| 41 | }} |
| 42 | |
| 43 | #endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED |
| 44 |
