This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24664] Template instantiation generating an array of voids doesn't fail
- From: "andrew dot stubbs at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2007 14:27:48 -0000
- Subject: [Bug c++/24664] Template instantiation generating an array of voids doesn't fail
- References: <bug-24664-10413@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from andrew dot stubbs at st dot com 2007-05-24 15:27 -------
You can create an array of functions. Also prohibited by clause 14.8.2/2.
template <class T> int f(T[5]);
typedef void (fn)();
int K = f<fn>(0);
At least it doesn't seem to accept reference types ...
--
andrew dot stubbs at st dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew dot stubbs at st dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24664