[Bug c++/13088] templatizing outer class hides specialization of inner template class
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 17 22:00:00 GMT 2003
------- Additional Comments From bangerth at dealii dot org 2003-11-17 22:00 -------
You boost guys really have ways to write totally incomprehensible
testcases...
Anyway, the claim is justified, I guess. In essence, this boils down to
------------------
#include <iostream>
template <typename> struct S {
template <typename> struct Type {};
};
template <typename> struct X {
template <typename> struct Local;
};
template <typename U>
template <typename>
struct X<U>::Local {
static void id() { std::cout << "primary\n" ;}
};
template <typename U>
template <typename T>
struct X<U>::Local<typename S<U>::template Type<T> > {
static void id() { std::cout << "specialized\n" ;}
};
int main() {
X<int>::Local<S<int>::Type<int> >::id();
}
-------------------------------
For this, we get
g/x> /home/bangerth/bin/gcc-3.3.2/bin/c++ x.cc ; ./a.out
primary
The same holds for every other gcc version that doesn't ICE outright. On
the other hand, icc for example prints "specialized". I guess it's wrong
that we don't match the partial specialization of X::Local.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-17 22:00:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
More information about the Gcc-bugs
mailing list