This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Implement http://wg21.link/p1006, constexpr in pointer_traits
ClosedPublic

Authored by ldionne on Oct 30 2018, 7:15 AM.

Details

Summary

P1006 adds support for constexpr in the specialization of pointer_traits
for raw pointers. This is necessary in order to use pointer_traits in
the upcoming constexpr containers. We expect P1006 to be voted into the
working draft for C++20 at the San Diego meeting.

Diff Detail

Repository
rCXX libc++

Event Timeline

ldionne created this revision.Oct 30 2018, 7:15 AM
mclow.lists accepted this revision.Oct 30 2018, 7:31 AM

Modulo nits, this looks fine to me.
Can you add a reference to www/upcoming_meeting.html, please?

libcxx/include/memory
46 ↗(On Diff #171690)

I usually add // constexpr in C++20 in places like this.

libcxx/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp
15 ↗(On Diff #171690)

Again, // constexpr in C++20

23 ↗(On Diff #171690)

This should be > 17; we only test against released values.

41 ↗(On Diff #171690)

Same here: > 17

This revision is now accepted and ready to land.Oct 30 2018, 7:31 AM
ldionne updated this revision to Diff 171708.Oct 30 2018, 8:26 AM

Add link in upcoming_meeting.html

Add link in upcoming_meeting.html

Pardon my confusing suggestion.
What I meant was "commit a link into upcoming_meeting.html", not "Update upcoming_meeting.html as part of this patch".
Since I wasn't clear, I'll do that for you.

ldionne updated this revision to Diff 171809.Oct 30 2018, 2:56 PM
ldionne marked 4 inline comments as done.

Apply Marshall's comments

mclow.lists accepted this revision.Oct 30 2018, 3:51 PM
This revision was automatically updated to reflect the committed changes.