[libcxx-commits] [PATCH] D152327: [libc++] Fix an exception safety issue in `forward_list` and add tests.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 6 11:55:33 PDT 2023


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM w/ comments and passing CI, thanks!



================
Comment at: libcxx/test/std/containers/exception_safety_helpers.h:12
+
+#include <cassert>
+#include <cstddef>
----------------
`#include <functional>` for `hash`


================
Comment at: libcxx/test/std/containers/exception_safety_helpers.h:77
+    assert(T::created_by_copying == ThrowOn);
+    assert(T::destroyed == ThrowOn - 1);
+  }
----------------



================
Comment at: libcxx/test/std/containers/sequences/forwardlist/robust_against_exceptions.pass.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
Let's call this something like `exception_safety.pass.cpp` since `robust_against_foo` has a different meaning in the test suite (usually it means it's something we do across a large number of types).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152327/new/

https://reviews.llvm.org/D152327



More information about the libcxx-commits mailing list