Skip to main content
gamedev.net
🔒 Locked

static templated member functions

Started by CProgrammer Jan 10, 2004 at 2:13 AM 1 replies 200+ views
Original Post
CProgrammer
CProgrammer
I cant seem to define static templated member functions outside the class brackets or I get an error that it cant spezialize the template function. Must be a problem with vc6. Any ideas? -CProgrammer
overflowed
overflowed
Long story short, you''re right. It is a problem with vc6.
Check the Enginuity series. "superpig" mentions a few times that VC6 does not support partial specialization.

quote:

One useful feature I tried to implement (and couldn''t, because MSVC doesn''t support partial specialization) was the ability to set the functor''s return type. If you''re using a compiler which supports it, here''s a hint: all the Functor classes need to be specialized for the void return type. This is because return (obj->*func) doesn''t compile if func returns void. So, you''d have Functor, and then ObjFunctor (which is where MSVC breaks down, because I need to specify the ''void'' for R but can''t specify anything for T), and so on.


That''s from Enginuity 2, the Miscellanous Utilities page.
SiCrane
SiCrane
partial template specialization != out of body template definitions

However VC6 doesn''t support either.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.