diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-12 05:51:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-12 05:51:26 +0200 |
commit | 5773833af8d8644bb59e664fe068c93b825974e3 (patch) | |
tree | 727b5ed1d39b1ef5fb021395dcc3330dedb7bd0d /libbuild2/variable.ixx | |
parent | c027dfcdfccd1e5f581649ebf176b091081fa21d (diff) |
Hack around GCC 13 -Wdangling-reference false positives
See GCC bugs 107532, 110213.
Diffstat (limited to 'libbuild2/variable.ixx')
-rw-r--r-- | libbuild2/variable.ixx | 12 |
1 files changed, 6 insertions, 6 deletions
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 <typename T> inline const T& - cast (const lookup& l) + cast (lookup l) { return cast<T> (*l); } @@ -245,7 +245,7 @@ namespace build2 template <typename T> inline const T* - cast_null (const lookup& l) + cast_null (lookup l) { return l ? &cast<T> (*l) : nullptr; } @@ -259,7 +259,7 @@ namespace build2 template <typename T> inline const T& - cast_empty (const lookup& l) + cast_empty (lookup l) { return l ? cast<T> (l) : value_traits<T>::empty_instance; } @@ -273,7 +273,7 @@ namespace build2 template <typename T> inline T - cast_default (const lookup& l, const T& d) + cast_default (lookup l, const T& d) { return l ? cast<T> (l) : d; } @@ -287,7 +287,7 @@ namespace build2 template <typename T> inline T - cast_false (const lookup& l) + cast_false (lookup l) { return l && cast<T> (l); } @@ -301,7 +301,7 @@ namespace build2 template <typename T> inline T - cast_true (const lookup& l) + cast_true (lookup l) { return !l || cast<T> (l); } |