This is an archive of the discontinued LLVM Phabricator instance.

Add an `__is_inplace_index` metafunction.
ClosedPublic

Authored by mpark on Jun 12 2017, 12:06 PM.

Event Timeline

mpark created this revision.Jun 12 2017, 12:06 PM
EricWF accepted this revision.Jun 12 2017, 1:18 PM
EricWF added inline comments.
include/utility
937

Missing __uncvref_t . Is this intentional?

This revision is now accepted and ready to land.Jun 12 2017, 1:18 PM
mpark added inline comments.Jun 12 2017, 1:20 PM
include/utility
937

Oh, I can add that. As far as I understand, we're required to perform decay_t from variant's side anyway,
so uncvref would be a no-op for that case. But I guess that's fine?

mpark updated this revision to Diff 102238.Jun 12 2017, 1:22 PM

Add __uncvref.

EricWF added inline comments.Jun 12 2017, 1:22 PM
include/utility
937

Should be fine. I guess it doesn't matter. but it makes me a bit uncomfortable to have two different metafunctions, one that does decay and another that doesn't.

mpark marked 2 inline comments as done.Jun 12 2017, 1:23 PM
mclow.lists accepted this revision.Jun 12 2017, 7:27 PM

LGTM. Do we need any tests?

mpark added a comment.Jun 12 2017, 9:37 PM

LGTM. Do we need any tests?

I could add some. Where do you think they should live?

I could add some. Where do you think they should live?

libc++ specific tests (which this would definitely be) live in test/libcxx/.

How about test/libcxx/utilities/meta/meta.unary ?

mpark updated this revision to Diff 102477.Jun 13 2017, 10:23 PM

Add tests.

mpark updated this revision to Diff 102479.Jun 13 2017, 10:36 PM

Lined up the static_asserts.

mpark updated this revision to Diff 102480.Jun 13 2017, 10:48 PM

Add more tests.

This revision was automatically updated to reflect the committed changes.