/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under 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_STRICTEST_TRAVERSAL_20060123_2101) #define FUSION_STRICTEST_TRAVERSAL_20060123_2101 #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { struct forward_traversal_tag; struct bidirectional_traversal_tag; struct random_access_traversal_tag; namespace detail { template::value> struct stricter_traversal { typedef Tag1 type; }; template struct stricter_traversal { typedef Tag2 type; }; struct strictest_traversal_impl { template struct result; template struct result { typedef typename remove_reference::type next_value; typedef typename remove_reference::type strictest_so_far; typedef strictest_so_far tag1; typedef typename traits::category_of::type tag2; typedef typename stricter_traversal::type type; }; // never called, but needed for decltype-based result_of (C++0x) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED typename result::type operator()(StrictestSoFar&&, Next&&) const; #endif }; template struct strictest_traversal : result_of::fold< Sequence, fusion::random_access_traversal_tag, strictest_traversal_impl> {}; } }} #endif