This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Using typedefs as template arguments.
- To: ak at muc dot de
- Subject: Re: Using typedefs as template arguments.
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 10 Jul 1998 00:43:44 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <19980710022254.62895@kali.lrz-muenchen.de>
ak <ak@muc.de> writes:
> template <class T, size_t sz>
> inline int size(T (&array)[sz]) { return sz; }
> talen.cc: In function `int main()':
> talen.cc:12: no matching function for call to `size (char[100])'
> Is this a bug/unimplemented feature
Yes, it's a known problem that breaks template argument matching for
typedefs.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil