Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:10:13

0001 /*=============================================================================
0002     Copyright (c) 2011 Eric Niebler
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 
0008 #if !defined(BOOST_FUSION_SINGLE_VIEW_DISTANCE_IMPL_JUL_07_2011_1348PM)
0009 #define BOOST_FUSION_SINGLE_VIEW_DISTANCE_IMPL_JUL_07_2011_1348PM
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/mpl/minus.hpp>
0013 
0014 namespace boost { namespace fusion 
0015 {
0016     struct single_view_iterator_tag;
0017 
0018     namespace extension
0019     {
0020         template<typename Tag>
0021         struct distance_impl;
0022 
0023         template<>
0024         struct distance_impl<single_view_iterator_tag>
0025         {
0026             template<typename First, typename Last>
0027             struct apply
0028               : mpl::minus<typename Last::position, typename First::position>
0029             {
0030                 typedef typename mpl::minus<typename Last::position,
0031                     typename First::position>::type type;
0032 
0033                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0034                 static type
0035                 call(First const& /*first*/, Last const& /*last*/)
0036                 {
0037                     return type();
0038                 }
0039             };
0040         };
0041     }
0042 
0043 }}
0044 
0045 #endif