diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2023-05-01 16:59:46 +0200 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-05-02 07:03:57 -0400 |
commit | 00b4976f2cd5b26e557ed4f5995bc64f64f2e664 (patch) | |
tree | ff6eac0ea2c6d9156cbf38ba63f1849fd6c01fdd /AK/Variant.h | |
parent | 1422f7f90423b8aa5d326c0ca355d8911df9f2bf (diff) | |
download | serenity-00b4976f2cd5b26e557ed4f5995bc64f64f2e664.zip |
Everywhere: Make Lagom build with GCC 13
GCC 13 was released on 2023-04-26. This commit fixes Lagom build errors
when using an updated host toolchain:
- Adds a workaround for a bug in constraint handling, which made LibJS
fail to compile: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109683
- Silences the new `-Wdangling-reference` diagnostic globally. It
produces multiple false positives with no clear way to silence them
without `#pragmas`.
- Silences `-Wself-move` in `RefPtr` tests as GCC 13 adds this
previously Clang-exclusive warning.
Diffstat (limited to 'AK/Variant.h')
-rw-r--r-- | AK/Variant.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/AK/Variant.h b/AK/Variant.h index 46ed67c48b..372854f361 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -130,15 +130,16 @@ struct VariantConstructTag { template<typename T, typename Base> struct VariantConstructors { + // The pointless `typename Base` constraints are a workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109683 ALWAYS_INLINE VariantConstructors(T&& t) - requires(requires { T(move(t)); }) + requires(requires { T(move(t)); typename Base; }) { internal_cast().clear_without_destruction(); internal_cast().set(move(t), VariantNoClearTag {}); } ALWAYS_INLINE VariantConstructors(T const& t) - requires(requires { T(t); }) + requires(requires { T(t); typename Base; }) { internal_cast().clear_without_destruction(); internal_cast().set(t, VariantNoClearTag {}); |