From cbae2f916b8a7b4398d12632ecbc251456a75dae Mon Sep 17 00:00:00 2001 From: Zoe Clifford Date: Tue, 22 Aug 2023 13:44:58 -0700 Subject: Remove use of non-standard `char_traits` from Pl_Buffer `basic_string` implies use of `char_traits`. This char_traits specialization is not standard C++, and will be removed from LibC++ as of LLVM 18. To ensure continued LibC++ compatibility it needs to be removed. There are two possible replacements here: `std::string` (e.g. `std::basic_string`), or `std::vector`. I have opted for vector since this code is dealing with a binary buffer; though probably either way is fine (why does C++ even have strings anyway??). https://github.com/qpdf/qpdf/issues/1024 --- include/qpdf/Pl_Buffer.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qpdf/Pl_Buffer.hh b/include/qpdf/Pl_Buffer.hh index 39ef0746..5030e10e 100644 --- a/include/qpdf/Pl_Buffer.hh +++ b/include/qpdf/Pl_Buffer.hh @@ -33,6 +33,7 @@ #include // unused -- remove in qpdf 12 (see #785) #include +#include class QPDF_DLL_CLASS Pl_Buffer: public Pipeline { @@ -77,7 +78,7 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline Members(Members const&) = delete; bool ready{true}; - std::basic_string data; + std::vector data; }; std::shared_ptr m; -- cgit v1.2.3-70-g09d2