12 Mar
2009
12 Mar
'09
10:45 p.m.
I want to develop a way of checking if I can implement a trivial string converter through lexical_cast. If that converter doesn't exist then the developer is required to make one and a different converter is made that throws an exception if called (may not be the best way but for now that's what I'm working with). To be lexical castable T must be OutputStreamable, InputStreamable, CopyConstructable, and DefaultConstructable. I think I can implement checks for streamable through the sizeof trick...haven't thought of the exact way yet but I think it should work. I can't think of how to test for CopyConstructable or DefaultConstructable though. Any ideas?