From 1f6aed74154c7300942dae12adba5a43fc583eed Mon Sep 17 00:00:00 2001 From: Willy Scheibel Date: Fri, 21 Mar 2025 15:07:21 +0100 Subject: [PATCH] Workaround that fixes dangling reference warning (refs #352) --- source/glbinding-aux/source/types_to_string.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glbinding-aux/source/types_to_string.cpp b/source/glbinding-aux/source/types_to_string.cpp index ede00b87..cf4c3b9f 100644 --- a/source/glbinding-aux/source/types_to_string.cpp +++ b/source/glbinding-aux/source/types_to_string.cpp @@ -201,7 +201,8 @@ std::ostream & operator<<(std::ostream & stream, const Value & v template <> std::ostream & operator<<(std::ostream & stream, const Value & value) { - const auto & name = aux::Meta::getString(value.value()); + const auto glvalue = value.value(); + const auto & name = aux::Meta::getString(glvalue); stream.write(name.c_str(), static_cast(name.size())); return stream;