[glibmm] Glib::ustring_Iterator: Explicitly declare copy assignment



commit 6a173a5e4a5de8cde8d9d93ccfbfe0acd833cddc
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun Nov 3 17:12:52 2019 +0100

    Glib::ustring_Iterator: Explicitly declare copy assignment
    
    This disables a warning from g++ 9.2 (abbreviated here):
    
    In member function ‘bool Glib::ustring::validate(Glib::ustring::iterator&)’:
    error: implicitly-declared ..... is deprecated [-Werror=deprecated-copy]
     1206 |   first_invalid = iterator(string_.begin() + (valid_end - pdata));
    note: because ..... has user-provided .....
      972 | inline ustring_Iterator<T>::ustring_Iterator(
            const ustring_Iterator<std::string::iterator>& other)

 glib/glibmm/ustring.h | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index 6d9b7ff6..1ce7e979 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -105,6 +105,7 @@ public:
 
   inline ustring_Iterator();
   inline ustring_Iterator(const ustring_Iterator<std::string::iterator>& other);
+  ustring_Iterator& operator=(const ustring_Iterator& other) = default;
 
   inline value_type operator*() const;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]