https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104160
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: struct Array { static constexpr bool isArray() noexcept { return true; } }; template <typename JSONVariant> constexpr void buggyImpl(const JSONVariant& JSONValue) noexcept { constexpr bool t = JSONValue.isArray(); } int main() { buggyImpl(Array{}); return 0; } There might be a dup of this too.