I've got a problem with C++ templates i think. I'm a seasoned C++
coder myself, so i thought I'd be able to figure this one out, but no,
apparently i am less clevar than i had hoped... the source is here:
http://rafb.net/paste/results/7k7NCJ77.html
the problem is that i cannot find a general solution to the problem of
global constant strings being used as initialisers into the Typeless
class, they always come up as "unknown" type.
if you change "Typeless typeless6( "unsafe string" );" to "Typeless
typeless6( (const char*)"unsafe string" );", everything is fine, and
that's what I've been doing so far, but it feels cludgy.
I've tried templating out the [] with "template<int numChars> ...
const char[numChars]", but that doesn't seem to sign right to be
picked up. |