+1 for std::string and std::wstring. Sarge
> On 14 Sep, 2017, at 11:10, Mark Hanson <mhan...@pivotal.io> wrote: > > Hi All, > > I wanted to broach the subject of moving away from moving away from > CacheableStringPtrs for the toString representation of Serializable. It would > seem desirable to move to std::string and std::wstring to use more basic > types that would be faster to log and the code would be simpler for a user. > > Are there any opinions on this subject? > > Here is a before and after look at a chunk of code > > Before > > CacheableStringPtr ptr = pdxser->toString(); > if (ptr->isWideString()) { > printf(" query idx %d pulled object %S :: \n", i, > ptr->asWChar()); > } else { > printf(" query idx %d pulled object %s :: \n", i, > ptr->asChar()); > } > > After > > > if (pdxser->isWideString()) { > std::cout << " query idx “ << i << "pulled object ” << pdxser->toWString() > << std::endl; > } else { > std::cout << " query idx “ << i << "pulled object ” << pdxser->toString() > << std::endl; > } > > > Thanks, > Mark