--- document.h  2025-03-30 14:49:42.000000000 +0300
+++ document.h.new      2026-05-06 15:15:34.964280900 +0300
@@ -316,7 +316,7 @@

     GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}

-    GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+    GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; const_cast<SizeType&>(length) = rhs.length; }

     //! implicit conversion to plain CharType pointer
     operator const Ch *() const { return s; }
