
15 Oct
2011
15 Oct
'11
1:37 a.m.
I'm trying to specialize boost::lexical_cast to convert Objective-C objects into various standard C++ classes (for example, leveraging NSNumber::-intValue to create lexical_cast<int>(NSNumber*)). However, as Objective-C objects exist as pointers, I would imagine that they would fail the requirements of needing well-defined streaming operator<<() in order to use the stock boost::lexical_cast. Any words of advice on how to do this in a way that will do as little damage as possible?