[libcxx-commits] [PATCH] D132061: [libc++] static_assert preconditions in vector

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 2 18:21:19 PDT 2022


EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.

I would like other people to weigh in on this patch. I don't think these changes pull their weight. I'm not convinced they add clarity. And I'm certain they add complexity and cost -- also if we get the assert wrong (and I don't think we will), but we risk breaking totally valid code that would otherwise compile.

I feel like the conformance test is "does the function compile" and nothing more is needed.

Change my mind.



================
Comment at: libcxx/include/__memory/allocator_traits.h:398
+template <class _Alloc>
+struct __is_cpp17_move_insertable
+    : __is_cpp17_emplace_constructible<_Alloc, typename allocator_traits<_Alloc>::value_type&&> {};
----------------
Why are these not template aliases? Wouldn't that have a smaller compile time effect?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132061



More information about the libcxx-commits mailing list