Alex Rivera | Logout

Inheriting and overriding functions of a std::string?

Asked 2010-11-17T13:55:18.340
12

Since std::string is actually a typedef of a templated class, how can I override it? I want to make a UTF-8 std::string that will return the correct length, among other things.

Edit
Report

1 Answer

4

It is generally considered a mistake in C++ to derive from a standard library container. However, the functionality you are looking for has already been implemented. Have a look at Glib::ustring.

Hope this helps!

answered 2010-11-17T13:59:55.440

Your Answer