Page MenuHomePhabricator

[libc++] Simplify type_traits a bit more
ClosedPublic

Authored by philnik on Jul 4 2022, 11:38 AM.

Details

Reviewers
ldionne
Mordante
var-const
Group Reviewers
Restricted Project
Commits
rGa13822b35d11: [libc++] Simplify type_traits a bit more

Diff Detail

Event Timeline

philnik created this revision.Jul 4 2022, 11:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2022, 11:38 AM
philnik requested review of this revision.Jul 4 2022, 11:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2022, 11:38 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Aug 11 2022, 10:17 AM

LGTM with rebase and green CI.

This revision is now accepted and ready to land.Aug 11 2022, 10:17 AM

BTW, it's awesome to see these simplifications become possible. This is a payoff for dropping support for unreasonably old compilers.

philnik updated this revision to Diff 452410.Aug 13 2022, 4:39 AM
  • Fix GCC
philnik updated this revision to Diff 452456.Aug 13 2022, 2:07 PM
  • Work around GCC bug
philnik updated this revision to Diff 452492.Aug 14 2022, 1:29 AM
  • Work around implementation divergence
philnik updated this revision to Diff 452515.Aug 14 2022, 5:50 AM
  • Next try
huixie90 added inline comments.
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/types.h
26 ↗(On Diff #452515)

why is this change required?

philnik updated this revision to Diff 456025.Aug 26 2022, 2:22 PM
  • Use the old traits implementation for GCC
philnik added inline comments.
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/types.h
26 ↗(On Diff #452515)

This isn't actually required. I thought it was implementation divergence, but it's a GCC bug. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611. @CaseyCarter @STL_MSFT you might also want to look into that.

STL_MSFT added inline comments.Aug 26 2022, 2:52 PM
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/types.h
26 ↗(On Diff #452515)

I'm missing context here - apologies for not being up to speed. MSVC's STL supports MSVC and Clang as first-class citizens (and we use libcxx's test suite with our STL), but we don't attempt to support GCC. Are you requesting any changes to MSVC's compiler or libraries here that we could help with?

philnik added inline comments.Aug 26 2022, 2:55 PM
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/types.h
26 ↗(On Diff #452515)

The MSVC compiler has very similar bugs regarding noexcept specifications on defaulted special member functions. https://godbolt.org/z/1z4fb11hr is the full reproducer.

philnik updated this revision to Diff 456048.Aug 26 2022, 3:56 PM
  • Fix is_nothrow_move_constructible
philnik updated this revision to Diff 456087.Aug 26 2022, 11:47 PM
  • Next try
This revision was automatically updated to reflect the committed changes.