#include <boost/preprocessor/control/iif.hpp> #include <boost/preprocessor/logical/or.hpp #define OR_IF(p, q, t, f) BOOST_PP_IIF(BOOST_PP_OR(p, q), t, f) OR_IF(1, 0, abc, xyz) // expands to abc OR_IF(0, 0, abc, xyz) // expands to xyz
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)