diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-09-07 20:46:23 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-08 00:37:19 +0200 |
commit | f633fb706ec385c82a1c0ce67241a43f8b001304 (patch) | |
tree | a9d2a44a665887218ea1e026ae759e1b19136ad6 /AK/Optional.h | |
parent | 93ce8fc985efb9bad73de3c582bb8347d997b1a7 (diff) | |
download | serenity-f633fb706ec385c82a1c0ce67241a43f8b001304.zip |
AK: Add note about an internal compile error with Optional in GCC 10.3+
This bit me because I accidentally made the destructor for a class which
was wrapped in an Optional private. This causes none of the Optional
destructors to be able to be deduced, which when combined with concepts
causes an internal compile error in GCC 10.3.0+. This commit adds a note
here to make sure that future encounters of this bug does not surprise
people.
Diffstat (limited to 'AK/Optional.h')
-rw-r--r-- | AK/Optional.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/AK/Optional.h b/AK/Optional.h index bbe0d38ba6..12a0ad1d58 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -14,6 +14,14 @@ namespace AK { +// NOTE: If you're here because of an internal compiler error in GCC 10.3.0+, +// it's because of the following bug: +// +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96745 +// +// Make sure you didn't accidentally make your destructor private before +// you start bug hunting. :^) + template<typename T> class [[nodiscard]] Optional { public: |