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.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index 3220a62..2d7f8ba 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -465,37 +465,37 @@ namespace build2 template T& cast (value&); template T&& cast (value&&); template const T& cast (const value&); - template const T& cast (const lookup&); + template const T& cast (lookup); // As above but returns NULL if the value is NULL (or not defined, in // case of lookup). // template T* cast_null (value&); template const T* cast_null (const value&); - template const T* cast_null (const lookup&); + template const T* cast_null (lookup); // As above but returns empty value if the value is NULL (or not defined, in // case of lookup). // template const T& cast_empty (const value&); - template const T& cast_empty (const lookup&); + template const T& cast_empty (lookup); // As above but returns the specified default if the value is NULL (or not // defined, in case of lookup). Note that the return is by value, not by // reference. // template T cast_default (const value&, const T&); - template T cast_default (const lookup&, const T&); + template T cast_default (lookup, const T&); // As above but returns false/true if the value is NULL (or not defined, // in case of lookup). Note that the template argument is only for // documentation and should be bool (or semantically compatible). // template T cast_false (const value&); - template T cast_false (const lookup&); + template T cast_false (lookup); template T cast_true (const value&); - template T cast_true (const lookup&); + template T cast_true (lookup); // Assign value type to the value. The variable is optional and is only used // for diagnostics. -- cgit v1.1