aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorZoe Clifford <zoeclifford@google.com>2023-08-22 22:44:58 +0200
committerZoe Clifford <zoeclifford@google.com>2023-08-22 22:44:58 +0200
commitcbae2f916b8a7b4398d12632ecbc251456a75dae (patch)
treef917b85c7abe1f72a280650d3aa8afd4a73e9bd3 /include
parent5d6ee83e3f39b5ee8768e93599ec09fa66d25908 (diff)
downloadqpdf-cbae2f916b8a7b4398d12632ecbc251456a75dae.tar.zst
Remove use of non-standard `char_traits<unsigned char>` from Pl_Buffer
`basic_string<unsigned char>` implies use of `char_traits<unsigned char>`. 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<char>`), or `std::vector<unsigned char>`. 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
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/Pl_Buffer.hh3
1 files changed, 2 insertions, 1 deletions
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 <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785)
#include <memory>
+#include <vector>
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<unsigned char> data;
+ std::vector<unsigned char> data;
};
std::shared_ptr<Members> m;