From b46dfd9064330ac71cdc0a2ec7007cccbc5de6d9 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Tue, 19 Mar 2013 11:38:08 -0400 Subject: [PATCH] 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). --- boost/numpy/invoke_matching.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/boost/numpy/invoke_matching.hpp b/boost/numpy/invoke_matching.hpp index 0e95ff96..6a4dfdb1 100644 --- a/boost/numpy/invoke_matching.hpp +++ b/boost/numpy/invoke_matching.hpp @@ -44,7 +44,7 @@ struct dtype_template_invoker { if (dtype::get_builtin() == m_dtype) { - m_func.template apply(); + m_func.Function::template apply(); throw dtype_template_match_found(); } } @@ -66,7 +66,7 @@ struct dtype_template_invoker< boost::reference_wrapper > { if (dtype::get_builtin() == m_dtype) { - m_func.template apply(); + m_func.Function::template apply(); throw dtype_template_match_found(); } } @@ -87,7 +87,7 @@ struct nd_template_invoker { if (m_nd == N) { - m_func.template apply(); + m_func.Function::template apply(); throw nd_template_match_found(); } } @@ -107,7 +107,7 @@ struct nd_template_invoker< boost::reference_wrapper > { if (m_nd == N) { - m_func.template apply(); + m_func.Function::template apply(); throw nd_template_match_found(); } } @@ -148,7 +148,7 @@ template struct array_template_invoker_wrapper_2 { template - void apply() const { m_func.template apply();} + void apply() const { m_func.Function::template apply();} array_template_invoker_wrapper_2(Function & func) : m_func(func) {} private: