I\'m currently working on a template-meta-programming based implementation of floating-point arithmetic. The template which represent compile-time float values is as follows:
You might want to use user-defined literals. According to cppreference.com, it
Allows integer, floating-point, character, and string literals to produce objects of user-defined type by defining a user-defined suffix.
(see also http://en.cppreference.com/w/cpp/language/user_literal). This way, you could make the expression
123.456_mysuffix
yield whatever type you want, if you define the literal operator for _mysuffix. With that operator, you can access the input 123.456 either as a (standard c++) floating point number or you can do the necessary conversion from the raw string as a const char* yourself.
EDIT: After reading your edited question and realizing what kind of template meta-programming you were talking about, I just wanted to emphasize that the literal can also be accessed as a parameter pack of char
template parameters. You might be able to integrate this into your compile time framework.