From 330ac02c14044b03128438729471a822672f9354 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 10 Aug 2013 12:42:47 +0000 Subject: [PATCH] Remove BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENT This makes boost::config independent of boost::core in the modularized repos. (from Stephen Kelly) Daniel James: The original patch included changes for several libraries. I'll deal with them later, they shouldn't break since the changes were to remove code that won't be activated any more. [SVN r85274] --- .../boost_config/boost_macro_reference.html | 18 ----- doc/macro_reference.qbk | 4 -- include/boost/config/suffix.hpp | 66 +------------------ 3 files changed, 1 insertion(+), 87 deletions(-) diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 544d399a..7b391ff2 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -392,24 +392,6 @@ - -

- BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -

- - -

- Compiler -

- - -

- Can only use deduced template arguments when calling function template - instantiations. -

- - -

BOOST_NO_FUNCTION_TEMPLATE_ORDERING diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 76a6a967..4133fa6f 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -105,10 +105,6 @@ indeed doing so may be impossible in some cases. Those libraries that do honor this will typically abort if a critical error occurs - you have been warned! ]] -[[`BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS`][Compiler][ -Can only use deduced template arguments when calling function template -instantiations. -]] [[`BOOST_NO_FUNCTION_TEMPLATE_ORDERING`][Compiler][ The compiler does not perform function template ordering or its function template ordering is incorrect. diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 1d9cec61..c55579ea 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -503,69 +503,8 @@ namespace boost{ #endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// -// -// Some compilers have problems with function templates whose template -// parameters don't appear in the function parameter list (basically -// they just link one instantiation of the template in the final -// executable). These macros provide a uniform way to cope with the -// problem with no effects on the calling syntax. -// Example: -// -// #include -// #include -// #include -// -// template -// void f() { std::cout << n << ' '; } -// -// template -// void g() { std::cout << typeid(T).name() << ' '; } -// -// int main() { -// f<1>(); -// f<2>(); -// -// g(); -// g(); -// } -// -// With VC++ 6.0 the output is: -// -// 2 2 double double -// -// To fix it, write -// -// template -// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... } -// -// template -// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... } -// - - -#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus) - -# include "boost/type.hpp" -# include "boost/non_type.hpp" - -# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 -# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* - -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ - , BOOST_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ - , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ - , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ - , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -#else - -// no workaround needed: expand to nothing +// These macros are obsolete. Port away and remove. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) @@ -577,9 +516,6 @@ namespace boost{ # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS - // When BOOST_NO_STD_TYPEINFO is defined, we can just import // the global definition into std namespace: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)