From f633fb706ec385c82a1c0ce67241a43f8b001304 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Tue, 7 Sep 2021 20:46:23 +0000 Subject: [PATCH] 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. --- AK/Optional.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 class [[nodiscard]] Optional { public: