[libcxx-commits] [PATCH] D68365: [libc++] Implement P1004R2 (constexpr std::vector)

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 26 08:58:57 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/include/vector:428
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
     ~vector()
----------------
EricWF wrote:
> Is this ever constexpr with the calls to the debug functions?
The `std::__debug_db_*` have `if (!__libcpp_is_constant_evaluated())` in them.


================
Comment at: libcxx/include/vector:653
 
-    bool __invariants() const;
+    _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
 
----------------
EricWF wrote:
> is this function actually constexpr-able?
Why wouldn't it? We're just comparing pointers in there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68365



More information about the libcxx-commits mailing list