From bdf62ac678f917d4c774c0d3d62f50c1f926bfb6 Mon Sep 17 00:00:00 2001 From: Bogdan Guliaev Date: Fri, 6 Sep 2024 11:07:50 +0300 Subject: [PATCH] Fix C++11 build --- httplib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 9e59534..1b00586 100644 --- a/httplib.h +++ b/httplib.h @@ -840,7 +840,6 @@ public: bool match(Request &request) const override; private: - static constexpr char marker[] = "/:"; // Treat segment separators as the end of path parameter capture // Does not need to handle query parameters as they are parsed before path // matching @@ -5887,6 +5886,8 @@ inline socket_t BufferStream::socket() const { return 0; } inline const std::string &BufferStream::get_buffer() const { return buffer; } inline PathParamsMatcher::PathParamsMatcher(const std::string &pattern) { + static constexpr char marker[] = "/:"; + // One past the last ending position of a path param substring std::size_t last_param_end = 0;