/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_DISTANCE_09172005_0721) #define FUSION_DISTANCE_09172005_0721 #include #include #include #include #include #include namespace boost { namespace fusion { struct random_access_traversal_tag; struct array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag namespace extension { template struct distance_impl { // default implementation template struct apply : distance_detail::linear_distance { typedef typename traits::category_of::type first_category; typedef typename traits::category_of::type last_category; BOOST_MPL_ASSERT((is_same)); BOOST_MPL_ASSERT_NOT((is_same)); }; }; template <> struct distance_impl; template <> struct distance_impl; template <> struct distance_impl; } namespace result_of { template struct distance : extension::distance_impl::type>:: template apply {}; } template inline typename result_of::distance::type distance(First const& a, Last const& b) { return result_of::distance::call(a,b); } }} #endif