
2 Apr
2008
2 Apr
'08
11:18 p.m.
Hi, I need conversion from strings to integers. But the strings could also be hex numbers. So example is, typedef unsigned long hexType; hexType value; lexical_cast<HexType>("0xAABBCCDD"); How do we extend the boost::lexical_cast to support casting user defined types? I can perform this by specialization but those would need to be in boost namespace which does not seem to be a recommended way to add customizations. Thanks, Shiva