This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Allow a standard library that implements LWG 1203 in istream.rvalue/rvalue.pass.cpp
ClosedPublic

Authored by BillyONeal on May 25 2018, 4:56 PM.

Details

Summary

If a standard library implements LWG 1203 (which I am implementing in MSVC++ right now) the return value of (istringstream() << A{}) is an rvalue, so it can't have an lvalue reference bound to it. Change this test to bind a forwarding reference instead which allows both standard behavior and LWG 1203 proposed behavior.

Note that LWG 1203 is presently not accepted.

Diff Detail

Event Timeline

BillyONeal created this revision.May 25 2018, 4:56 PM

Committed r339214

(If there are changes requested I'll do them in a follow up commit)

Adding ldionne as suggested by Eric.

ldionne accepted this revision.Aug 9 2018, 5:17 AM

LGTM

This revision is now accepted and ready to land.Aug 9 2018, 5:17 AM
BillyONeal closed this revision.Aug 9 2018, 11:59 AM