From: Remi Gacogne Date: Wed, 12 Nov 2025 09:21:05 +0000 (+0100) Subject: fix(protozero): Keep the SpanID and TraceID ctors `constexpr` X-Git-Tag: rec-5.4.0-alpha1~105^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16425%2Fhead;p=thirdparty%2Fpdns.git fix(protozero): Keep the SpanID and TraceID ctors `constexpr` Signed-off-by: Remi Gacogne --- diff --git a/pdns/protozero-trace.hh b/pdns/protozero-trace.hh index 1b2fc2b9fe..31c48d1a3b 100644 --- a/pdns/protozero-trace.hh +++ b/pdns/protozero-trace.hh @@ -231,7 +231,7 @@ struct InstrumentationScope struct TraceID : public std::array { - TraceID() : + constexpr TraceID() : array{} {}; TraceID(const std::initializer_list& arg) : array{} @@ -262,11 +262,11 @@ struct TraceID : public std::array this->fill(0); } }; -const TraceID s_emptyTraceID = {}; +constexpr TraceID s_emptyTraceID = {}; struct SpanID : public std::array { - SpanID() : + constexpr SpanID() : array{} {}; SpanID(const std::initializer_list& arg) : array{} @@ -297,7 +297,7 @@ struct SpanID : public std::array this->fill(0); } }; -const SpanID s_emptySpanID = {}; +constexpr SpanID s_emptySpanID = {}; inline void fill(TraceID& trace, const std::string& data) {