Can PR c++/3905 (sizeof on function call in template) be done on 3.2.x?
Kriang Lerdsuwanakij
lerdsuwa@users.sf.net
Mon Feb 9 14:40:00 GMT 2004
Michael Matz wrote:
> Okay, my question is: how much work would this be for a more experienced
> C++ frontend hacker (like someone who, uhm, at least knows where to look
> at ;-) ) to do, and is this feasible at all?
>
> ----------------------
> template <class T>
> struct S
> {
> static int foo (void);
> enum { val = sizeof (foo()) };
> };
>
> int main () { return S<char>::val; }
> ----------------------
>
I think this patch is the one you want :)
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01597.html
The message is messed up when displayed but extracting the patch from HTML
source should be fine. I'm not sure if the patch applies cleanly.
--Kriang
More information about the Gcc
mailing list