Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: /// \file rend.hpp Chris@16: /// Proto callables for boost::rend() Chris@16: // Chris@16: // Copyright 2012 Eric Niebler. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012 Chris@16: #define BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012 Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace proto { namespace functional Chris@16: { Chris@16: Chris@16: // A PolymorphicFunctionObject that wraps boost::rend() Chris@16: struct rend Chris@16: { Chris@16: BOOST_PROTO_CALLABLE() Chris@16: Chris@16: template Chris@16: struct result; Chris@16: Chris@16: template Chris@16: struct result Chris@16: : boost::range_reverse_iterator Chris@16: {}; Chris@16: Chris@16: template Chris@16: struct result Chris@16: : boost::range_reverse_iterator Chris@16: {}; Chris@16: Chris@16: template Chris@16: typename boost::range_reverse_iterator::type operator()(Rng &rng) const Chris@16: { Chris@16: return boost::rend(rng); Chris@16: } Chris@16: Chris@16: template Chris@16: typename boost::range_reverse_iterator::type operator()(Rng const &rng) const Chris@16: { Chris@16: return boost::rend(rng); Chris@16: } Chris@16: }; Chris@16: Chris@16: }}} Chris@16: Chris@16: #endif