HomePhabricator

[libc++] Implement LWG1203

Authored by ldionne on Sep 22 2020, 12:46 PM.

Description

[libc++] Implement LWG1203

Libc++ had an issue where nonsensical code like

decltype(std::stringstream{} << std::vector<int>{});

would compile, as long as you kept the expression inside decltype in
an unevaluated operand. This turned out to be that we didn't implement
LWG1203, which clarifies what we should do in that case.

rdar://58769296

Details

Committed
ldionneSep 22 2020, 2:15 PM
Parents
rG49f274493176: Change LoopInfo::empty to isInnermost after D82895
Branches
Unknown
Tags
Unknown
Reverted By
rGe46c1def5233: Revert "[libc++] Implement LWG1203"

Event Timeline

Fixed again by

commit c90dee1e90045feb039be640864f038eebd1d8cd
Author: Louis Dionne <ldionne@apple.com>
Date:   Wed Sep 23 08:49:00 2020 -0400

    [libc++] Re-apply fdc41e11f (LWG1203) without breaking the C++11 build

    fdc41e11f was reverted in e46c1def5 because it broke the C++11 build.
    We shouldn't be using enable_if_t in C++11, instead we must use
    enable_if<...>::type.