Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2011 Joel de Guzman Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #if !defined(FUSION_ITERATOR_FACADE_09252006_1011) Chris@16: #define FUSION_ITERATOR_FACADE_09252006_1011 Chris@16: Chris@101: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@101: #include Chris@16: Chris@16: namespace boost { namespace fusion Chris@16: { Chris@16: struct iterator_facade_tag; Chris@16: Chris@16: template Chris@16: struct iterator_facade : iterator_base Chris@16: { Chris@16: typedef iterator_facade_tag fusion_tag; Chris@16: typedef Derived derived_type; Chris@16: typedef Category category; Chris@16: Chris@16: // default implementation Chris@16: template Chris@16: struct equal_to // default implementation Chris@16: : is_same< Chris@16: typename I1::derived_type Chris@16: , typename I2::derived_type Chris@16: > Chris@16: {}; Chris@16: Chris@16: // default implementation Chris@16: template Chris@16: struct advance : Chris@16: mpl::if_c< Chris@16: (N::value > 0) Chris@16: , advance_detail::forward Chris@16: , advance_detail::backward Chris@16: >::type Chris@16: { Chris@16: BOOST_MPL_ASSERT_NOT((traits::is_random_access)); Chris@16: }; Chris@16: Chris@16: // default implementation Chris@16: template Chris@16: struct distance : Chris@16: distance_detail::linear_distance Chris@16: {}; Chris@16: }; Chris@16: }} Chris@16: Chris@101: #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 Chris@101: namespace std Chris@101: { Chris@101: template Chris@101: struct iterator_traits< ::boost::fusion::iterator_facade > Chris@101: { }; Chris@101: } Chris@16: #endif Chris@101: Chris@101: #endif