From 0c7bebd1301fc69a9d7337dd5ae6c5c3a1ca5967 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 1 Apr 2015 21:40:56 -0400 Subject: [PATCH 1/2] Remove reliance on deprecated type_traits headers. --- include/boost/function_types/components.hpp | 3 --- include/boost/function_types/function_arity.hpp | 2 -- include/boost/function_types/function_pointer.hpp | 2 -- include/boost/function_types/function_reference.hpp | 2 -- include/boost/function_types/function_type.hpp | 1 - include/boost/function_types/is_callable_builtin.hpp | 2 -- include/boost/function_types/is_function.hpp | 2 -- include/boost/function_types/is_function_pointer.hpp | 2 -- include/boost/function_types/is_function_reference.hpp | 2 -- include/boost/function_types/is_member_function_pointer.hpp | 2 -- include/boost/function_types/is_member_object_pointer.hpp | 2 -- include/boost/function_types/is_member_pointer.hpp | 2 -- include/boost/function_types/is_nonmember_callable_builtin.hpp | 2 -- include/boost/function_types/member_function_pointer.hpp | 2 -- include/boost/function_types/member_object_pointer.hpp | 2 -- include/boost/function_types/parameter_types.hpp | 2 -- include/boost/function_types/result_type.hpp | 2 -- 17 files changed, 34 deletions(-) diff --git a/include/boost/function_types/components.hpp b/include/boost/function_types/components.hpp index d348682..6f22098 100644 --- a/include/boost/function_types/components.hpp +++ b/include/boost/function_types/components.hpp @@ -15,7 +15,6 @@ #include #include -#include #include @@ -416,8 +415,6 @@ namespace boost } } // namespace function_types::detail - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::components) - } // namespace ::boost #include diff --git a/include/boost/function_types/function_arity.hpp b/include/boost/function_types/function_arity.hpp index 40f0f65..a81001b 100644 --- a/include/boost/function_types/function_arity.hpp +++ b/include/boost/function_types/function_arity.hpp @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -31,7 +30,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(1,function_arity,(T)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::function_arity) } #endif diff --git a/include/boost/function_types/function_pointer.hpp b/include/boost/function_types/function_pointer.hpp index a8b832f..cb13918 100644 --- a/include/boost/function_types/function_pointer.hpp +++ b/include/boost/function_types/function_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_FUNCTION_POINTER_HPP_INCLUDED #include -#include #include @@ -25,7 +24,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_pointer,(Types,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_pointer) } #endif diff --git a/include/boost/function_types/function_reference.hpp b/include/boost/function_types/function_reference.hpp index 5fe7e3c..3eceae0 100644 --- a/include/boost/function_types/function_reference.hpp +++ b/include/boost/function_types/function_reference.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_FUNCTION_REFERENCE_HPP_INCLUDED #include -#include #include @@ -25,7 +24,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_reference,(Types,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_reference) } #endif diff --git a/include/boost/function_types/function_type.hpp b/include/boost/function_types/function_type.hpp index c3b2c96..afe3654 100644 --- a/include/boost/function_types/function_type.hpp +++ b/include/boost/function_types/function_type.hpp @@ -22,7 +22,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_type,(Types,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_type) } #endif diff --git a/include/boost/function_types/is_callable_builtin.hpp b/include/boost/function_types/is_callable_builtin.hpp index b1a7c83..3b826ea 100644 --- a/include/boost/function_types/is_callable_builtin.hpp +++ b/include/boost/function_types/is_callable_builtin.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_CALLABLE_BUILTIN_HPP_INCLUDED #include -#include #include @@ -28,7 +27,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_callable_builtin,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_callable_builtin) } #endif diff --git a/include/boost/function_types/is_function.hpp b/include/boost/function_types/is_function.hpp index d29229b..09f75b1 100644 --- a/include/boost/function_types/is_function.hpp +++ b/include/boost/function_types/is_function.hpp @@ -9,7 +9,6 @@ #define BOOST_FT_IS_FUNCTION_HPP_INCLUDED #include -#include #include @@ -27,7 +26,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function) } #endif diff --git a/include/boost/function_types/is_function_pointer.hpp b/include/boost/function_types/is_function_pointer.hpp index 5bff6d3..67a0402 100644 --- a/include/boost/function_types/is_function_pointer.hpp +++ b/include/boost/function_types/is_function_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_FUNCTION_POINTER_HPP_INCLUDED #include -#include #include @@ -28,7 +27,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function_pointer,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function_pointer) } #endif diff --git a/include/boost/function_types/is_function_reference.hpp b/include/boost/function_types/is_function_reference.hpp index f2e4c1c..6bf908d 100644 --- a/include/boost/function_types/is_function_reference.hpp +++ b/include/boost/function_types/is_function_reference.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_FUNCTION_REFERENCE_HPP_INCLUDED #include -#include #include @@ -27,7 +26,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function_reference,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function_reference) } #endif diff --git a/include/boost/function_types/is_member_function_pointer.hpp b/include/boost/function_types/is_member_function_pointer.hpp index a519035..ef54765 100644 --- a/include/boost/function_types/is_member_function_pointer.hpp +++ b/include/boost/function_types/is_member_function_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #include -#include #include @@ -27,7 +26,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_function_pointer,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_function_pointer) } #endif diff --git a/include/boost/function_types/is_member_object_pointer.hpp b/include/boost/function_types/is_member_object_pointer.hpp index 77527d9..10bc89a 100644 --- a/include/boost/function_types/is_member_object_pointer.hpp +++ b/include/boost/function_types/is_member_object_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED #include -#include #include @@ -27,7 +26,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_member_object_pointer,(T)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::is_member_object_pointer) } #endif diff --git a/include/boost/function_types/is_member_pointer.hpp b/include/boost/function_types/is_member_pointer.hpp index f53e0be..db1da29 100644 --- a/include/boost/function_types/is_member_pointer.hpp +++ b/include/boost/function_types/is_member_pointer.hpp @@ -9,7 +9,6 @@ #define BOOST_FT_IS_MEMBER_POINTER_HPP_INCLUDED #include -#include #include @@ -27,7 +26,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_pointer,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_pointer) } #endif diff --git a/include/boost/function_types/is_nonmember_callable_builtin.hpp b/include/boost/function_types/is_nonmember_callable_builtin.hpp index 3a27a2e..6105285 100644 --- a/include/boost/function_types/is_nonmember_callable_builtin.hpp +++ b/include/boost/function_types/is_nonmember_callable_builtin.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_IS_NONMEMBER_CALLABLE_BUILTIN_HPP_INCLUDED #include -#include #include @@ -28,7 +27,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_nonmember_callable_builtin,(T,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_nonmember_callable_builtin) } #endif diff --git a/include/boost/function_types/member_function_pointer.hpp b/include/boost/function_types/member_function_pointer.hpp index eab6111..104271f 100644 --- a/include/boost/function_types/member_function_pointer.hpp +++ b/include/boost/function_types/member_function_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #include -#include #include #include @@ -26,7 +25,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,member_function_pointer,(Types,Tag)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::member_function_pointer) } #endif diff --git a/include/boost/function_types/member_object_pointer.hpp b/include/boost/function_types/member_object_pointer.hpp index d0aa3f3..1951654 100644 --- a/include/boost/function_types/member_object_pointer.hpp +++ b/include/boost/function_types/member_object_pointer.hpp @@ -10,7 +10,6 @@ #define BOOST_FT_MEMBER_OBJECT_POINTER_HPP_INCLUDED #include -#include #include #include @@ -26,7 +25,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(1,member_object_pointer,(Types)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::member_object_pointer) } #endif diff --git a/include/boost/function_types/parameter_types.hpp b/include/boost/function_types/parameter_types.hpp index 5e049bf..227ad27 100644 --- a/include/boost/function_types/parameter_types.hpp +++ b/include/boost/function_types/parameter_types.hpp @@ -13,7 +13,6 @@ #include #include -#include #include @@ -48,7 +47,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(2,parameter_types,(T,ClassTypeTransform)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::parameter_types) } #endif diff --git a/include/boost/function_types/result_type.hpp b/include/boost/function_types/result_type.hpp index 1fcaba6..db642c8 100644 --- a/include/boost/function_types/result_type.hpp +++ b/include/boost/function_types/result_type.hpp @@ -13,7 +13,6 @@ #include #include -#include #include @@ -43,7 +42,6 @@ namespace boost BOOST_MPL_AUX_LAMBDA_SUPPORT(1,result_type,(T)) }; } - BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::result_type) } #endif From 26e800a52fecf1dd5e08f7184a6bbfd6c5fb797d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 21 May 2015 19:08:40 +0100 Subject: [PATCH 2/2] Stop Using type_traits details. Some of the type_traits internal details this header depends on will either go away or be moved. Either way, best not to rely on another libraries internal details. In the short term the old code will work but will generate a ton of warnings about using a deprecated header. --- include/boost/function_types/detail/classifier.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/function_types/detail/classifier.hpp b/include/boost/function_types/detail/classifier.hpp index 03f3419..b5c5e71 100644 --- a/include/boost/function_types/detail/classifier.hpp +++ b/include/boost/function_types/detail/classifier.hpp @@ -11,7 +11,6 @@ #include #include -#include #include #include @@ -31,7 +30,13 @@ template struct encode_charr >::type type; }; -char BOOST_TT_DECL classifier_impl(...); +#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) +# define BOOST_FT_DECL __cdecl +#else +# define BOOST_FT_DECL /**/ +#endif + +char BOOST_FT_DECL classifier_impl(...); #define BOOST_FT_variations BOOST_FT_function|BOOST_FT_pointer|\ BOOST_FT_member_pointer