diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/stdapis/boost/mpl/next_prior.hpp --- a/epoc32/include/stdapis/boost/mpl/next_prior.hpp Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/stdapis/boost/mpl/next_prior.hpp Wed Mar 31 12:33:34 2010 +0100 @@ -1,51 +1,49 @@ -// Boost next_prior.hpp header file ---------------------------------------// -// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. 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) +#ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED -// See http://www.boost.org/libs/utility for documentation. +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. -// Revision History -// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) +// $Source: /cvsroot/boost/boost/boost/mpl/next_prior.hpp,v $ +// $Date: 2004/09/17 06:09:38 $ +// $Revision: 1.3 $ -#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED -#define BOOST_NEXT_PRIOR_HPP_INCLUDED +#include +#include +#include -#include +namespace boost { namespace mpl { -namespace boost { +BOOST_MPL_AUX_COMMON_NAME_WKND(next) +BOOST_MPL_AUX_COMMON_NAME_WKND(prior) -// Helper functions for classes like bidirectional iterators not supporting -// operator+ and operator- -// -// Usage: -// const std::list::iterator p = get_some_iterator(); -// const std::list::iterator prev = boost::prior(p); -// const std::list::iterator next = boost::next(prev, 2); +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct next +{ + typedef typename T::next type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) +}; -// Contributed by Dave Abrahams +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct prior +{ + typedef typename T::prior type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) +}; -template -inline T next(T x) { return ++x; } +BOOST_MPL_AUX_NA_SPEC(1, next) +BOOST_MPL_AUX_NA_SPEC(1, prior) -template -inline T next(T x, Distance n) -{ - std::advance(x, n); - return x; -} +}} -template -inline T prior(T x) { return --x; } - -template -inline T prior(T x, Distance n) -{ - std::advance(x, -n); - return x; -} - -} // namespace boost - -#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED +#endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED