On Wed, 22 Apr 2026 at 09:27, Tomasz Kamiński <[email protected]> wrote:
>
> This covers issue affecting pre-C+26 features that were resolved
> during 2026 Croydon meeting.
>
> libstdc++-v3/ChangeLog:
>
> * include/bits/chrono_io.h: Add comment for LWG3831.
> * include/bits/print.h: Add comment for LWG4549.
> * include/std/condition_variable: Add comment for LWG3504.
> * include/std/format: Add comments for LWG4522.
> * include/std/inplace_vector: Add comment for LWG4122.
> * include/std/mdspan: Add comment for LWG4314.
> * include/std/optional: Add comment for LWG2746.
> ---
> OK for trunk?
>
> libstdc++-v3/include/bits/chrono_io.h | 2 ++
> libstdc++-v3/include/bits/print.h | 2 ++
> libstdc++-v3/include/std/condition_variable | 2 ++
> libstdc++-v3/include/std/format | 4 ++++
> libstdc++-v3/include/std/mdspan | 2 ++
> libstdc++-v3/include/std/optional | 2 ++
> 6 files changed, 14 insertions(+)
>
> diff --git a/libstdc++-v3/include/bits/chrono_io.h
> b/libstdc++-v3/include/bits/chrono_io.h
> index f5a0a65a48d..1fe50ad79e0 100644
> --- a/libstdc++-v3/include/bits/chrono_io.h
> +++ b/libstdc++-v3/include/bits/chrono_io.h
> @@ -1313,6 +1313,8 @@ namespace __format
>
> int __yi = (int)__y;
> const bool __is_neg = __yi < 0;
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 3831. Two-digit formatting of negative year is ambiguous
> __yi = __builtin_abs(__yi);
> int __ci = __yi / 100;
> // For floored division -123//100 is -2 and -100//100 is -1
> diff --git a/libstdc++-v3/include/bits/print.h
> b/libstdc++-v3/include/bits/print.h
> index 17567f2f554..20724844726 100644
> --- a/libstdc++-v3/include/bits/print.h
> +++ b/libstdc++-v3/include/bits/print.h
> @@ -282,6 +282,8 @@ namespace __format
> vprint_nonunicode_buffered(FILE* __stream, string_view __fmt,
> format_args __args)
> {
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 4549. vprint_nonunicode_buffered ignores its stream parameter
I don't think this one needs to be here, it's almost editorial (and
vprint_unicode_buffered wasn't even in C++23 anyway, it was added by a
DR).
The commit summary line says "alredy" which should be "already".
OK with that fixed, assuming all tests still pass (adding lines can
cause dg-error line numbers to stop matching in tests).
> __format::_Str_sink<char> __buf;
> std::vformat_to(__buf.out(), __fmt, __args);
> auto __out = __buf.view();
> diff --git a/libstdc++-v3/include/std/condition_variable
> b/libstdc++-v3/include/std/condition_variable
> index 9e515123e7c..ce995ed5777 100644
> --- a/libstdc++-v3/include/std/condition_variable
> +++ b/libstdc++-v3/include/std/condition_variable
> @@ -163,6 +163,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> wait_for(unique_lock<mutex>& __lock,
> const chrono::duration<_Rep, _Period>& __rtime)
> {
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 3504. condition_variable::wait_for is overspecified
> using __dur = typename steady_clock::duration;
> return wait_until(__lock,
> steady_clock::now() +
> diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format
> index 92add1e0a01..4627381fa9e 100644
> --- a/libstdc++-v3/include/std/format
> +++ b/libstdc++-v3/include/std/format
> @@ -1718,6 +1718,8 @@ namespace __format
> {
> _CharT __wbuf[__buf_size];
> size_t __n = __narrow_str.size();
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 4522. Clarify that `std::format` transcodes for
> `std::wformat_strings`
> std::__to_wstring_numeric(__narrow_str.data(), __n, __wbuf);
> return _M_format_int(basic_string_view<_CharT>(__wbuf, __n),
> __prefix_len, __fc);
> @@ -2304,6 +2306,8 @@ namespace __format
> #ifdef _GLIBCXX_USE_WCHAR_T
> else
> {
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 4522. Clarify that `std::format` transcodes for
> `std::wformat_strings`
> __wstr = std::__to_wstring_numeric(__narrow_str);
> __str = __wstr;
> }
> diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
> index f30c5e83d16..14d8edc8ad1 100644
> --- a/libstdc++-v3/include/std/mdspan
> +++ b/libstdc++-v3/include/std/mdspan
> @@ -103,6 +103,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> }
> else
> {
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 4314. Missing move in mdspan layout mapping::operator()
> auto __ret =
> static_cast<_IndexType>(std::forward<_OIndexTypeRef>(__other));
> if constexpr (std::is_signed_v<_IndexType>)
> __glibcxx_assert(__ret >= 0);
> diff --git a/libstdc++-v3/include/std/optional
> b/libstdc++-v3/include/std/optional
> index 49ba7b6b45d..d0fa306addb 100644
> --- a/libstdc++-v3/include/std/optional
> +++ b/libstdc++-v3/include/std/optional
> @@ -1145,6 +1145,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> return *this;
> }
>
> + // _GLIBCXX_RESOLVE_LIB_DEFECTS
> + // 2746. Inconsistency between requirements for emplace between
> optional and variant
> template<typename... _Args>
> _GLIBCXX20_CONSTEXPR
> enable_if_t<is_constructible_v<_Tp, _Args...>, _Tp&>
> --
> 2.53.0
>