3rdParty/boost/1.78.0/libs/preprocessor/doc/ref/iif.html
The BOOST_PP_IIF macro chooses between to values based on a bitwise condition.
BOOST_PP_IIF (bit, t, f)
bit The condition that determines if the result is expr or nothing. This value must expand to 0 or 1. t The result of the expansion if bit is 1. f The result of the expansion if bit is 0.
This macro does not perform a boolean conversion on its first argument. If that conversion is necessary, use BOOST_PP_IF instead.
Header: <boost/preprocessor/control/iif.hpp>
#include <[boost/preprocessor/control/iif.hpp](../headers/control/iif.html)>
#include <[boost/preprocessor/logical/or.hpp](../headers/logical/or.html)>
#define OR_IF(p, q, t, f)[BOOST\_PP\_IIF](iif.html)([BOOST\_PP\_OR](or.html)(p, q), t, f)
OR_IF(1, 0, abc, xyz) // expands to abc
OR_IF(0, 0, abc, xyz) // expands to xyz
Copyright Housemarque Oy 2002 Copyright Paul Mensonides 2002
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)