[libcxx-commits] [libcxx] [libc++] Simplify a bunch of noexcept specifications (PR #166397)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 5 03:07:24 PST 2025
================
@@ -29,25 +29,7 @@ struct some_alloc {
void allocate(std::size_t);
};
-int main(int, char**) {
-#if defined(_LIBCPP_VERSION)
- {
- typedef std::list<MoveOnly> C;
- static_assert(std::is_nothrow_move_constructible<C>::value, "");
- }
- {
- typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
- static_assert(std::is_nothrow_move_constructible<C>::value, "");
- }
- {
- typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
- static_assert(std::is_nothrow_move_constructible<C>::value, "");
- }
-#endif // _LIBCPP_VERSION
- {
- typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
- static_assert(!std::is_nothrow_move_constructible<C>::value, "");
- }
-
- return 0;
-}
+static_assert(std::is_nothrow_move_constructible<std::list<MoveOnly>>::value, "");
----------------
frederick-vs-ja wrote:
Ditto.
https://github.com/llvm/llvm-project/pull/166397
More information about the libcxx-commits
mailing list