From 5773833af8d8644bb59e664fe068c93b825974e3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Jun 2023 05:51:26 +0200 Subject: Hack around GCC 13 -Wdangling-reference false positives See GCC bugs 107532, 110213. --- libbuild2/variable.ixx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libbuild2/variable.ixx') diff --git a/libbuild2/variable.ixx b/libbuild2/variable.ixx index c7b1f35..51c35fd 100644 --- a/libbuild2/variable.ixx +++ b/libbuild2/variable.ixx @@ -224,7 +224,7 @@ namespace build2 template inline const T& - cast (const lookup& l) + cast (lookup l) { return cast (*l); } @@ -245,7 +245,7 @@ namespace build2 template inline const T* - cast_null (const lookup& l) + cast_null (lookup l) { return l ? &cast (*l) : nullptr; } @@ -259,7 +259,7 @@ namespace build2 template inline const T& - cast_empty (const lookup& l) + cast_empty (lookup l) { return l ? cast (l) : value_traits::empty_instance; } @@ -273,7 +273,7 @@ namespace build2 template inline T - cast_default (const lookup& l, const T& d) + cast_default (lookup l, const T& d) { return l ? cast (l) : d; } @@ -287,7 +287,7 @@ namespace build2 template inline T - cast_false (const lookup& l) + cast_false (lookup l) { return l && cast (l); } @@ -301,7 +301,7 @@ namespace build2 template inline T - cast_true (const lookup& l) + cast_true (lookup l) { return !l || cast (l); } -- cgit v1.1