This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix template instantiation depth issues with std::tuple
ClosedPublic

Authored by ldionne on Apr 30 2021, 1:28 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG84f0bb619507: [libc++] Fix template instantiation depth issues with std::tuple
Summary

This fixes the issue by implementing _And using the short-circuiting
SFINAE trick that we previously used only in std::tuple. One thing we
could look into is use the naive recursive implementation for disjunctions
with a small number of arguments, and use that trick with larger numbers
of arguments. It might be the case that the constant overhead for setting
up the SFINAE trick makes it only worth doing for larger packs, but that's
left for further work.

This problem was raised in https://reviews.llvm.org/D96523.

Diff Detail

Event Timeline

ldionne requested review of this revision.Apr 30 2021, 1:28 PM
ldionne created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2021, 1:28 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jgorbe added a subscriber: jgorbe.Apr 30 2021, 4:06 PM
ldionne updated this revision to Diff 342416.May 3 2021, 9:09 AM

Greatly simplify the implementation of _And, and hopefully fix C++03

ldionne accepted this revision as: Restricted Project.May 3 2021, 11:42 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 3 2021, 11:42 AM
This revision was automatically updated to reflect the committed changes.