From 8b80a1187764c07138e3feba524f8aa3658bd443 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 12 Aug 2011 07:24:00 +0000 Subject: [PATCH] revert to prior (again). [SVN r73692] --- .../algorithm/transformation/pop_back.hpp | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/include/boost/fusion/algorithm/transformation/pop_back.hpp b/include/boost/fusion/algorithm/transformation/pop_back.hpp index 08bc4c8d..6eb743fd 100644 --- a/include/boost/fusion/algorithm/transformation/pop_back.hpp +++ b/include/boost/fusion/algorithm/transformation/pop_back.hpp @@ -1,7 +1,7 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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_POP_BACK_09172005_1038) @@ -10,9 +10,7 @@ #include #include #include -#include -#include -#include +#include namespace boost { namespace fusion { @@ -21,14 +19,13 @@ namespace boost { namespace fusion template struct pop_back { - static int const size = size::value; - BOOST_STATIC_ASSERT(size > 0); - typedef typename begin::type begin_type; - typedef mpl::int_ end_index; - typedef typename advance::type end_type; - - typedef - iterator_range + typedef + iterator_range< + typename begin::type + , typename prior< + typename end::type + >::type + > type; }; } @@ -37,12 +34,8 @@ namespace boost { namespace fusion inline typename result_of::pop_back::type pop_back(Sequence const& seq) { - typedef typename - result_of::pop_back::end_index - end_index; - typedef typename result_of::pop_back::type result; - return result(fusion::begin(seq), fusion::advance(fusion::begin(seq))); + return result(fusion::begin(seq), fusion::prior(fusion::end(seq))); } }}