From: Giuseppe D'Angelo Date: Fri, 13 Jun 2025 09:38:23 +0000 (+0200) Subject: libstdc++: add a workaround for format_kind> [PR120644] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6f4efdf397269793167fb1303967e7ad0e467a7;p=thirdparty%2Fgcc.git libstdc++: add a workaround for format_kind> [PR120644] The specialization of format_kind for optional is causing a problem when optional is imported and included. The comments on the PR strongly suggest that this is a frontend bug; this commit just works around the issue by specifying the type of format_kind> to be `range_format`, rather than leaving the compiler deduce it via `auto`. PR c++/120644 libstdc++-v3/ChangeLog: * include/std/optional (format_kind): Do not use `auto`. --- diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional index 2ae71f11e21..cc7af5bbd7d 100644 --- a/libstdc++-v3/include/std/optional +++ b/libstdc++-v3/include/std/optional @@ -1815,7 +1815,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ranges::enable_view> = true; template - inline constexpr auto + inline constexpr range_format format_kind> = range_format::disabled; #endif // __cpp_lib_optional_range_support