This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61355] New: gcc doesn't normalize type in non-type template parameters
- From: "vanyacpp at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 May 2014 13:34:13 +0000
- Subject: [Bug c++/61355] New: gcc doesn't normalize type in non-type template parameters
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61355
Bug ID: 61355
Summary: gcc doesn't normalize type in non-type template
parameters
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vanyacpp at gmail dot com
template<class T, T I>
struct X {
};
int test() {
X<int(), test> x;
}
GCC rejects this code with a message:
3.cpp: In function âint test()â:
3.cpp:6:18: error: âint()â is not a valid type for a template non-type
parameter
X<int(), test> x;
^
3.cpp:6:21: error: invalid type in declaration before â;â token
X<int(), test> x;
^
I believe type int() should be normalized to int (*)().