|
Boost Users : |
Subject: [Boost-users] compile-time string literal manipulation?
From: Stiles Watson (watson_at_[hidden])
Date: 2010-10-27 17:46:05
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net