c++boost.gif (8819 bytes)

#include <boost/preprocessor/list/fold_right.hpp>


#define BOOST_PP_LIST_FOLD_RIGHT(F,L,P)

Iterates F(D,X,P) for each element X of the list L (from the right or the end of the list).

In other words,

  BOOST_PP_LIST_FOLD_RIGHT(F,L,P)

expands to:

  F
  ( D
  , BOOST_PP_LIST_AT(L,0)
  , ... F
        ( D
        , BOOST_PP_LIST_AT(L,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(L),2))
        , F
          ( D
          , BOOST_PP_LIST_AT(L,BOOST_PP_SUB(BOOST_PP_LIST_SIZE(L),1))
          , P
          )
        ) ...
  )

See

Uses


(C) Copyright Housemarque Oy 2002

Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.

Generated: