forked from boostorg/preprocessor
Added OPT macro to determine whether C++20's __VA_OPT__ is supported or not. Updated the undocumented variadic IS_EMPTY to use the functionality of __VA_OPT__ if it exists to provide perfect functionality for testing for emptiness.
This commit is contained in:
@ -16,8 +16,18 @@
|
||||
|
||||
#define FUNC_GEN9(x,y,z) anything
|
||||
|
||||
#if defined(__cplusplus) && __cplusplus > 201703L
|
||||
|
||||
# include <boost/preprocessor/variadic/opt.hpp>
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == BOOST_PP_VARIADIC_OPT() END
|
||||
|
||||
#else
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
BEGIN 1 == 0 END
|
||||
|
Reference in New Issue
Block a user