From d71524a79958942c3a9cbd93099b5180c490a68a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 7 Jul 2022 10:05:05 +0200 Subject: [PATCH] Make build `-Wundef` clean Use `#ifdef __cpp_noexcept_function_type` instead of `#if __cpp_noexcept_function_type` to avoid `-Wundef` warnings. Also add that flag to the test flags to detect those on CI. --- .../detail/is_function_ptr_helper.hpp | 54 +++++++++---------- .../detail/is_mem_fun_pointer_impl.hpp | 54 +++++++++---------- test/Jamfile.v2 | 1 + test/is_function_test.cpp | 2 +- test/test.hpp | 4 +- 5 files changed, 58 insertions(+), 57 deletions(-) diff --git a/include/boost/type_traits/detail/is_function_ptr_helper.hpp b/include/boost/type_traits/detail/is_function_ptr_helper.hpp index 73a705c..688c5da 100644 --- a/include/boost/type_traits/detail/is_function_ptr_helper.hpp +++ b/include/boost/type_traits/detail/is_function_ptr_helper.hpp @@ -49,7 +49,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -63,7 +63,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = tr template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -77,7 +77,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -91,7 +91,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, va template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -105,7 +105,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -119,7 +119,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONSTANT( template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -133,7 +133,7 @@ struct is_function_ptr_helper { BOOST_STATIC_CONST template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -147,7 +147,7 @@ struct is_function_ptr_helper { BOOST_STATIC_C template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -161,7 +161,7 @@ struct is_function_ptr_helper { BOOST_STAT template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -175,7 +175,7 @@ struct is_function_ptr_helper { BOOST_ template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -189,7 +189,7 @@ struct is_function_ptr_helper { BO template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -203,7 +203,7 @@ struct is_function_ptr_helper template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -217,7 +217,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -231,7 +231,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -245,7 +245,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -259,7 +259,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -273,7 +273,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -287,7 +287,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -301,7 +301,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -315,7 +315,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -329,7 +329,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -343,7 +343,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -357,7 +357,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -371,7 +371,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -385,7 +385,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -399,7 +399,7 @@ struct is_function_ptr_helper struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -432,7 +432,7 @@ struct is_function_ptr_helper { template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif -@#if __cpp_noexcept_function_type +@#ifdef __cpp_noexcept_function_type template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING diff --git a/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp index dcc6e2a..90b825d 100644 --- a/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +++ b/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp @@ -67,7 +67,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -113,7 +113,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -159,7 +159,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -205,7 +205,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -251,7 +251,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -297,7 +297,7 @@ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -343,7 +343,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -389,7 +389,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -435,7 +435,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -481,7 +481,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -527,7 +527,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -573,7 +573,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -619,7 +619,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -665,7 +665,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -711,7 +711,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -757,7 +757,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -803,7 +803,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -849,7 +849,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -895,7 +895,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -941,7 +941,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -987,7 +987,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1033,7 +1033,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1079,7 +1079,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1125,7 +1125,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1171,7 +1171,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1217,7 +1217,7 @@ template { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING @@ -1290,7 +1290,7 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e58b1f1..727d66a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -25,6 +25,7 @@ project : requirements gcc:-Wno-uninitialized gcc:-Wno-int-in-bool-context gcc:-Wno-bool-operation + gcc:-Wundef gcc:on intel:on sun:on diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index dc69071..b5ed11e 100644 --- a/test/is_function_test.cpp +++ b/test/is_function_test.cpp @@ -43,7 +43,7 @@ typedef void foo1_t(int); typedef void foo2_t(int&, double); typedef void foo3_t(int&, bool, int, int); typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int); -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type typedef int foo5_t(void)noexcept; typedef int foo6_t(double)noexcept(false); typedef int foo7_t(int, double)noexcept(true); diff --git a/test/test.hpp b/test/test.hpp index 9c46b9c..9dcbd35 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -193,7 +193,7 @@ struct UDT int f2(); int f3(int); int f4(int, float); -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type void f5()noexcept; int f6(int)noexcept(true); double f7()noexcept(false); @@ -209,7 +209,7 @@ typedef int (UDT::*mf3)(int); typedef int (UDT::*mf4)(int, float); typedef int (UDT::*mp); typedef int (UDT::*cmf)(int) const; -#if __cpp_noexcept_function_type +#ifdef __cpp_noexcept_function_type typedef void (UDT::*mf5)()noexcept; typedef int (UDT::*mf6)(int)noexcept; typedef double (UDT::*mf7)()noexcept;