
17 Nov
2011
17 Nov
'11
9:29 p.m.
El 17/11/2011 18:31, Yi Ding escribió:
Hi,
Thanks for the new containers library. There's a lot of useful stuff in there. I was wondering: is it possible to do automatic conversion between boost::container::string and std::string? A lot of libraries currently use std::string.
Thanks, Yi
Automatic conversion is not usually a good idea. I guess you can use std::string(boost_string.c_str()); Maybe we could do an ugly hack to move memory allocated with std::string to boost::container::string, avoiding costly copies, but that of course, would require playing with underfined behaviour.