]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/stacktrace/detail/frame_msvc.ipp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / stacktrace / detail / frame_msvc.ipp
index 21f6f90a7cbe78bf686d3c3aadee92fc2a46d8b5..4e6059029d38f1bfcc97caacf0ac4976252c8c46 100644 (file)
@@ -115,8 +115,13 @@ inline std::string mingw_demangling_workaround(const std::string& s) {
 }
 
 inline void trim_right_zeroes(std::string& s) {
-    while (s.back() == '\0') {
-        s.pop_back();
+    // MSVC-9 does not have back() and pop_back() functions in std::string
+    while (!s.empty()) {
+        const std::size_t last = static_cast<std::size_t>(s.size() - 1);
+        if (s[last] != '\0') {
+            break;
+        }
+        s.resize(last);
     }
 }