2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 16:32:16 +00:00

Qualify calls to template member functions in invoke_matching.

This is necessary to avoid a bug in which a template struct from another
namespace can be confused with the member function by the parser
(see gcc bug 55576; it's apparently a defect in the C++98 standard).
This commit is contained in:
Jim Bosch
2013-03-19 11:38:08 -04:00
parent 956606ef0c
commit b46dfd9064

View File

@@ -44,7 +44,7 @@ struct dtype_template_invoker
{
if (dtype::get_builtin<T>() == m_dtype)
{
m_func.template apply<T>();
m_func.Function::template apply<T>();
throw dtype_template_match_found();
}
}
@@ -66,7 +66,7 @@ struct dtype_template_invoker< boost::reference_wrapper<Function> >
{
if (dtype::get_builtin<T>() == m_dtype)
{
m_func.template apply<T>();
m_func.Function::template apply<T>();
throw dtype_template_match_found();
}
}
@@ -87,7 +87,7 @@ struct nd_template_invoker
{
if (m_nd == N)
{
m_func.template apply<N>();
m_func.Function::template apply<N>();
throw nd_template_match_found();
}
}
@@ -107,7 +107,7 @@ struct nd_template_invoker< boost::reference_wrapper<Function> >
{
if (m_nd == N)
{
m_func.template apply<N>();
m_func.Function::template apply<N>();
throw nd_template_match_found();
}
}
@@ -148,7 +148,7 @@ template <typename T, typename Function>
struct array_template_invoker_wrapper_2
{
template <int N>
void apply() const { m_func.template apply<T,N>();}
void apply() const { m_func.Function::template apply<T,N>();}
array_template_invoker_wrapper_2(Function & func) : m_func(func) {}
private: