
On Fri, 21 Jan 2011 01:43:08 -0800, Patrick Horgan wrote:
... elision by patrick For interaction with functions that require std::string, and presumably don't care about the encoding, it's convenient. Without it, using the UTF classes with such a function requires calling the std::string constructor with the element iterators. That's going to be a major need for the foreseeable future. But if utf8_string, like std::string derives from basic_string, wouldn't
On 01/20/2011 03:46 PM, Chad Nelson wrote: that just work?
Rule 35 of C++ Coding Standard by Sutter and Alexandrescu: "Avoid inheriting from classes that were not designed to be classes" "Using a standalone class as a base is a serious design error" The reasons given include undefined behaviour when deleting a std::string* pointing to an instance of the subclass, slicing if extra data is added and pointlessness as the subclass doesn't get any more access to the superclass's implementation that it would have had if it just kept std::string as a member. Alex -- Easy SFTP for Windows Explorer (http://www.swish-sftp.org)