This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make C++03 reference_wrapper more like C++11.
ClosedPublic

Authored by Quuxplusone on Jan 22 2022, 4:49 PM.

Details

Summary

Remove a bunch of LIBCPP_CXX03_LANG. This is the result of a rabbithole to re-eliminate the workaround I introduced into std::cref in parent revision D117953. It turns out that Clang's C++03 mode (the only compiler we care about C++03 for) now supports all the things we were originally eschewing via LIBCPP_CXX03_LANG; we can fully support these reference_wrapper features in C++03 mode, and un-XFAIL the relevant tests.

Drive-by constexprify a few more tests.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Jan 22 2022, 4:49 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJan 22 2022, 4:49 PM
Mordante accepted this revision as: Mordante.Jan 23 2022, 4:28 AM
Mordante added a subscriber: Mordante.

LGTM after the CI passes.

libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
53–54

Does Clang support using in C++03?

philnik accepted this revision.Jan 23 2022, 4:38 AM

LGTM. CI failures look like they are unrelated.

libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
53–54
This revision is now accepted and ready to land.Jan 23 2022, 4:38 AM

LGTM. CI failures look like they are unrelated.

Yes I noticed in other reviews AIX 32/64 were flaky.

libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
53–54

Oke then it's fine. Seems Clang's C++03 isn't the C++03 I've used in the past ;-)

ldionne accepted this revision.Jan 25 2022, 3:51 PM

Please re-run CI, but if it's still only the AIX bot failing, then ignore it. Thanks for the cleanup, this is great.

Poke CI after landing D117953. Expect that CI will be green, or at most AIX will continue to fail for unrelated reasons.