function template specialization
Mark Mitchell
mark@markmitchell.com
Thu Feb 18 09:02:00 GMT 1999
Nathan --
>>>>> "Nathan" == Nathan Sidwell <nathan@acm.org> writes:
Nathan> Nathan Sidwell wrote:
>> [problem with function template specialization]
Nathan> Here's the .ii file I've been using, template<class T>
Nathan> void f(T); template<class T> void f(T *); template<class
Nathan> T> void f(T const *); template<> void f<int>(int *); void
Nathan> foo(int *p) { f(p); f<int>(p); }
Nathan> cc1plus rejects line 4 as an ambiguous template
Nathan> specialization, however it accepts line 8, as an equally
Nathan> similar specialization.
You're slightly behind the times. A couple of days ago, after
extensive private discussions with John Spicer, I reworked the
handling of these things. The current CVS sources accept your
program.
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
More information about the Gcc-bugs
mailing list