size_impl.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*=============================================================================
  2. Copyright (c) 2011 Eric Niebler
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_ITERATOR_RANGE_SIZE_IMPL_HPP_INCLUDED)
  7. #define BOOST_FUSION_ITERATOR_RANGE_SIZE_IMPL_HPP_INCLUDED
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/iterator/distance.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct iterator_range_tag;
  13. namespace extension
  14. {
  15. template <typename Tag>
  16. struct size_impl;
  17. template <>
  18. struct size_impl<iterator_range_tag>
  19. {
  20. template <typename Seq>
  21. struct apply
  22. : result_of::distance<
  23. typename Seq::begin_type,
  24. typename Seq::end_type
  25. >
  26. {};
  27. };
  28. }
  29. }}
  30. #endif