empty_sequence.hpp 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: empty_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
  12. // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
  13. // $Revision: 49267 $
  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. struct begin { typedef random_access_iterator_tag category; };
  22. typedef begin end;
  23. };
  24. template<>
  25. struct size_impl<empty_sequence::tag>
  26. {
  27. template< typename Sequence > struct apply
  28. : int_<0>
  29. {
  30. };
  31. };
  32. }}
  33. #endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED