This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30924] New: Array of pointer type argument in partial template specialization fails
- From: "enok at lysator dot liu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2007 10:06:40 -0000
- Subject: [Bug c++/30924] New: Array of pointer type argument in partial template specialization fails
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A quite simple array specialization construct is rejected by g++ with a
compiler error message. Not being a language specialist icc 9.1 accepts the
code even with -strict-ansi flag. Allegedly also comeau accepts the code. The
g++ compiler error message is also pretty strange and indicates a compiler bug.
template<typename T>
struct x {};
template<typename T, unsigned N>
struct x<T*[N]> {};
int main() {
x<int> a;
x<int*[10]> b;
return 0;
}
bash> g++-4.1.2 -c tst.cpp
tst.cpp:7: error: template parameters not used in partial
specialization: tst.cpp:7: error: ?T?
--
Summary: Array of pointer type argument in partial template
specialization fails
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: enok at lysator dot liu dot se
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30924