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]
This commit is contained in:
Daniel James
2013-08-10 12:42:47 +00:00
parent ffee60eade
commit 330ac02c14
3 changed files with 1 additions and 87 deletions

View File

@@ -392,24 +392,6 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS</span></code>
</p>
</td>
<td>
<p>
Compiler
</p>
</td>
<td>
<p>
Can only use deduced template arguments when calling function template
instantiations.
</p>
</td>
</tr>
<tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</span></code> <code class="computeroutput"><span class="identifier">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</span></code>

View File

@@ -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 honor this will typically abort if a critical error occurs - you have been
warned! 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][ [[`BOOST_NO_FUNCTION_TEMPLATE_ORDERING`][Compiler][
The compiler does not perform function template ordering or its function The compiler does not perform function template ordering or its function
template ordering is incorrect. template ordering is incorrect.

View File

@@ -503,69 +503,8 @@ namespace boost{
#endif #endif
// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// // 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: // These macros are obsolete. Port away and remove.
//
// #include <iostream>
// #include <ostream>
// #include <typeinfo>
//
// template <int n>
// void f() { std::cout << n << ' '; }
//
// template <typename T>
// void g() { std::cout << typeid(T).name() << ' '; }
//
// int main() {
// f<1>();
// f<2>();
//
// g<int>();
// g<double>();
// }
//
// With VC++ 6.0 the output is:
//
// 2 2 double double
//
// To fix it, write
//
// template <int n>
// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
//
// template <typename T>
// 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<t>* = 0
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
# 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
# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(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(t, v)
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(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 // When BOOST_NO_STD_TYPEINFO is defined, we can just import
// the global definition into std namespace: // the global definition into std namespace:
#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)