[all-commits] [llvm/llvm-project] ec5610: [libc++] Ensure strong exception guarantee for for...

Peng Liu via All-commits all-commits at lists.llvm.org
Wed Jun 4 10:04:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec5610c4a2ef15551fdfbe9c990851376f58efb6
      https://github.com/llvm/llvm-project/commit/ec5610c4a2ef15551fdfbe9c990851376f58efb6
  Author: Peng Liu <winner245 at hotmail.com>
  Date:   2025-06-04 (Wed, 04 Jun 2025)

  Changed paths:
    M libcxx/docs/Status/Cxx2cIssues.csv
    M libcxx/include/forward_list
    M libcxx/test/std/containers/exception_safety_helpers.h
    M libcxx/test/std/containers/sequences/forwardlist/exception_safety.pass.cpp

  Log Message:
  -----------
  [libc++] Ensure strong exception guarantee for forward_list::resize (#131025)

The current implementation of `forward_list::resize` does not meet the
strong exception safety guarantee required by [forward.list.modifiers]:

    If an exception is thrown by any of these member functions there is no
    effect on the container.

This patch refactors `resize()` to provide strong exception safety and
introduces additional tests to validate the strong exception guarantees
for other `forward_list` modifiers.

Fixes #118366.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list