
27 Oct
2010
27 Oct
'10
9:46 p.m.
I'm a new to metaprogramming so please bare with the stupid questions: I have a requirement to convert string literals to a specified format at compile-time. In otherwords, given a literal like "3A689", I need to verify the value and, if not valid, generate a correct value such that: //pseudocode const char ch[] = verify<"3A689">::valid_value; would result in something like: const char ch[] = "03A689X"; Can I use Boost to write a template to do this? I know that is extremely vague, but does anyone have any thoughts? Thanks.