empty_sequence.hpp 921 B

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