/*============================================================================= Copyright (c) 2011 Eric Niebler 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(BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED) #define BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED #include namespace boost { namespace fusion { namespace detail { //////////////////////////////////////////////////////////////////////////// template struct reverse_cons; template struct reverse_cons, State> { typedef reverse_cons > impl; typedef typename impl::type type; static type call(cons const &cons, State const &state = State()) { typedef fusion::cons cdr_type; return impl::call(cons.cdr, cdr_type(cons.car, state)); } }; template struct reverse_cons { typedef State type; static State const &call(nil const &, State const &state = State()) { return state; } }; }}} #endif