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:
Edward Diener
2019-09-25 06:29:04 -04:00
parent c436de6142
commit e476f10f52
11 changed files with 167 additions and 24 deletions

22
test/test_macro.h Normal file
View File

@ -0,0 +1,22 @@
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_MACRO_H
# define BOOST_LIBS_PREPROCESSOR_REGRESSION_TEST_MACRO_H
#
# include <boost/preprocessor/cat.hpp>
#
# define BEGIN typedef int BOOST_PP_CAT(test_, __LINE__)[((
# define END )==1) ? 1 : -1];
#
# endif