ports/devel/cpprestsdk/files/patch-src_json_json.cpp
Jan-Espen Oversand 6cbfd8b1e7 devel/cpprestsdk: Fix include of json.h
De-inlining the constructor and destructor makes the sizeof(_Value) available to
std::unique_ptr.

PR:		276187
Reported by:	sigsegv@radiotube.org
2024-01-08 18:53:11 +01:00

19 lines
490 B
C++

--- src/json/json.cpp.orig 2023-12-05 04:23:31 UTC
+++ src/json/json.cpp
@@ -495,3 +495,16 @@ const web::json::details::json_error_category_impl& we
#endif
return instance;
}
+
+#ifdef ENABLE_JSON_VALUE_VISUALIZER
+web::json::value::value(std::unique_ptr<details::_Value> v, value_type kind) : m_value(std::move(v)
+), m_kind(kind)
+#else
+web::json::value::value(std::unique_ptr<details::_Value> v) : m_value(std::move(v))
+#endif
+{
+}
+
+web::json::value::~value() noexcept
+{
+}