This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Remove the _LIBCPP_BOOL_CONSTANT macro
ClosedPublic

Authored by ldionne on Mar 23 2022, 2:03 PM.

Details

Reviewers
jloser
Group Reviewers
Restricted Project
Commits
rGf900f7025c7b: [libc++] Remove the _LIBCPP_BOOL_CONSTANT macro
Summary

I suspect this is a remnant of the times when we were not comfortable
using Clang's C++11/14 extensions everywhere, but now we do, so we can
use _BoolConstant instead and get rid of the macro.

Diff Detail

Event Timeline

ldionne created this revision.Mar 23 2022, 2:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 2:03 PM
ldionne requested review of this revision.Mar 23 2022, 2:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 2:03 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision as: Restricted Project.Mar 23 2022, 2:04 PM

This seems pretty uncontroversial, so I'll ship this if CI is green unless there is discussion by Friday.

jloser accepted this revision.Mar 23 2022, 7:22 PM
jloser added a subscriber: jloser.

LGTM FWIW.

This revision is now accepted and ready to land.Mar 23 2022, 7:22 PM
This revision was automatically updated to reflect the committed changes.
mstorsjo added inline comments.
libcxx/include/exception
303

This previously was public _LIBCPP_BOOL_CONSTANT, now it's a plain _BoolConstant - is the lost public keyword relevant here or not?

ldionne marked an inline comment as done.Mar 25 2022, 6:56 AM
ldionne added inline comments.
libcxx/include/exception
303

Not really, since it's a struct so it's public by default. The usual convention in metaprogramming is to omit the public and use structs all the time.