#include <boost/preprocessor/list/fold_left.hpp> #include <boost/preprocessor/selection/min.hpp> #define LIST (1, (3, (5, (2, (4, BOOST_PP_NIL))))) #define OP(d, state, x) BOOST_PP_MIN_D(d, state, x) #define LIST_MAX(list) BOOST_PP_LIST_FOLD_LEFT(OP, 20, LIST) LIST_MIN(LIST) // expands to 1
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)