Skip to content

Commit 01fe546

Browse files
committed
Fix test
Signed-off-by: yronglin <[email protected]>
1 parent 6312ab0 commit 01fe546

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818

1919
void test() {
2020
// expected-error@*:* {{static assertion failed}}
21+
22+
// Turns to an error since C++26 (Disallow Binding a Returned Glvalue to a Temporary https://wg21.link/P2748R5).
23+
#if _LIBCPP_STD_VER >= 26
2124
// expected-error@*:* {{returning reference to local temporary object}}
25+
#else
26+
// expected-warning@*:* {{returning reference to local temporary object}}
27+
#endif
2228
std::ignore = std::make_from_tuple<const int&>(std::tuple<char>{});
2329
}

0 commit comments

Comments
 (0)