On 22 Feb, 2007, at 18:01, Wesley Smith wrote:
Is it actually possible to process the characters of a string during
the C++ compilation process or is this something that is impossible
due to the C++ spec? I'm startign to think it isn't possible at all
and that only number types like the famous Factorial template can be
handled this way. What document could I look in to find this out?
thanks,
wes
For your problem, it would be necessary to convert the string into a
type that represents the string, to pass that as a template
parameter. But you can't use [] nor * on a char * at compile time.
On the other hand, sizeof will do what you want without any templates.
Anyway, you are likely to receive better answers from comp.lang.c++
or comp.lang.c++.moderated.