
Alexander Nasonov schrieb:
Hansi
writes: It works now for pointers too, but now I have the problem with the char type. First I have made a specialization for this type. Is it here also possible to make only one specialization or have I to provide both for pointer and value?
I wonder what your Validator validates? You seem to be mixing values and pointers which is not a good idea.
At the moment I mix references and pointers. I know that it would be better to not use pointers. But there are cases where it is easier to use it. In this cases it is allways != NULL There are made a few more checks with the validator (ranges, possible values e.g.).
BTW,
http://www.boost.org/doc/libs/1_35_0/libs/conversion/lexical_cast.htm#change...
"The previous version of lexical_cast allowed unsafe and meaningless conversions to pointers. The current version now throws a bad_lexical_cast for conversions to pointers: lexical_cast
("Goodbye, World") now throws an exception instead of causing undefined behavior." -- Alexander