[Bug c++/12228] [DR 244/399] syntax error calling a qualified template dtor
sebor at roguewave dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 9 21:27:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12228
------- Additional Comments From sebor at roguewave dot com 2003-09-09 21:27 -------
Subject: Re: [DR 244/399] syntax error calling a qualified
template dtor
bangerth at dealii dot org wrote:
...
> ------- Additional Comments From bangerth at dealii dot org 2003-09-09 21:03 -------
> Confirmed. I'd guess that at places one would need a template disambiguator, as in
> template <class T> void foo (N::B<T> *p) {
> p->template ~NB ();
> but that doesn't help.
You're right, although the keyword would actually have to go on the
left of the :: operator, like here:
namespace N {
template <class> struct A { template <class> struct B { }; };
}
template <class T, class U>
void foo (typename N::A<T>::template B<U> *p)
{
p->N::A<T>::template B<U>::~B ();
}
Martin
More information about the Gcc-bugs
mailing list