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