summaryrefslogtreecommitdiff
path: root/lang/gnu-apl/files/patch-src_UTF8__string.hh
blob: 14a0824eaff17d51b6ee36fddc2ae552c3b022a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- src/UTF8_string.hh.orig	2019-06-23 12:39:20 UTC
+++ src/UTF8_string.hh
@@ -45,7 +45,7 @@ utf8P(const void * vp)
 }
 //-----------------------------------------------------------------------------
 /// an UTF8 encoded Unicode (RFC 3629) string
-class UTF8_string : public std::basic_string<UTF8>
+class UTF8_string : public std::string
 {
 public:
    /// constructor: empty UTF8_string
@@ -79,15 +79,9 @@ class UTF8_string : public std::basic_string<UTF8> (pu
         return true;
       }
 
-   /// return \b this string as a 0-termionated C string
-   const char * c_str() const
-      { return reinterpret_cast<const char *>
-                               (std::basic_string<UTF8>::c_str()); }
-
-   /// prevent basic_string::erase() with its dangerous default value for
-   /// the number of erased character.
+   /// erase one item at \b pos
    void erase(size_t pos)
-      { basic_string::erase(pos, 1); }
+      { std::string::erase(begin() + pos); }
 
    /// return the last byte in this string
    UTF8 back() const