Topic: pointer to template function instance


Author: "G.B." <gbush@my-deja.com>
Date: 1999/11/16
Raw View
Erich Eichinger <oaky@gmx.at> wrote in message
news:80prih$1ho$2@news.tuwien.ac.at...
[snip]
>    void (*pfnFoo)(void*);
>
>    pfnFoo = &foo<SomeClass>; // <-- std conform ?
>}
>
>Should this explicit template function instantiation be legal
>standard C++? My Compiler refuses this (VC 6 SVP 3)...

The code is perfectly legal. Template function is explicitly instantiated
and its address is taken.
I guess it's one of many VC bugs that prevent compiling it. BCB4 compiles
your code without a hitch.

Gene Bushuyev




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]