[PATCH] D53867: [libcxx] Implement http://wg21.link/p1006, constexpr in pointer_traits
Marshall Clow via Phabricator
reviews at reviews.llvm.org
Tue Oct 30 07:33:07 PDT 2018
mclow.lists accepted this revision.
mclow.lists added a comment.
This revision is now accepted and ready to land.
Modulo nits, this looks fine to me.
Can you add a reference to www/upcoming_meeting.html, please?
================
Comment at: libcxx/include/memory:46
- static pointer pointer_to(<details>) noexcept;
+ static constexpr pointer pointer_to(<details>) noexcept;
};
----------------
I usually add `// constexpr in C++20` in places like this.
================
Comment at: libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp:15
// {
-// static pointer pointer_to(<details>);
+// constexpr static pointer pointer_to(<details>);
// ...
----------------
Again, `// constexpr in C++20`
================
Comment at: libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp:23
-int main()
-{
+#if TEST_STD_VER >= 20
+constexpr
----------------
This should be `> 17`; we only test against released values.
================
Comment at: libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp:41
+ check();
+#if TEST_STD_VER >= 20
+ static_assert(check(), "");
----------------
Same here: `> 17`
Repository:
rCXX libc++
https://reviews.llvm.org/D53867
More information about the libcxx-commits
mailing list