You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libcxx/docs/Status/Cxx23Papers.csv
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@
43
43
"`P0627R6 <https://wg21.link/P0627R6>`__","Function to mark unreachable code","2022-02 (Virtual)","|Complete|","15","`#105175 <https://github.com/llvm/llvm-project/issues/105175>`__",""
44
44
"`P1206R7 <https://wg21.link/P1206R7>`__","``ranges::to``: A function to convert any range to a container","2022-02 (Virtual)","|Complete|","17","`#105176 <https://github.com/llvm/llvm-project/issues/105176>`__",""
45
45
"`P1413R3 <https://wg21.link/P1413R3>`__","Deprecate ``std::aligned_storage`` and ``std::aligned_union``","2022-02 (Virtual)","|Complete|","","`#105177 <https://github.com/llvm/llvm-project/issues/105177>`__","``std::aligned_storage_t`` and ``std::aligned_union_t`` are marked deprecated, but clang doesn't issue a diagnostic for deprecated using template declarations."
46
-
"`P2255R2 <https://wg21.link/P2255R2>`__","A type trait to detect reference binding to temporary","2022-02 (Virtual)","|Partial|","","`#105180 <https://github.com/llvm/llvm-project/issues/105180>`__","Implemented the type traits only."
46
+
"`P2255R2 <https://wg21.link/P2255R2>`__","A type trait to detect reference binding to temporary","2022-02 (Virtual)","|Partial|","","`#105180 <https://github.com/llvm/llvm-project/issues/105180>`__","Implemented the type traits and changes to ``std::pair`` only."
"`P2387R3 <https://wg21.link/P2387R3>`__","Pipe support for user-defined range adaptors","2022-02 (Virtual)","|Complete|","19","`#105183 <https://github.com/llvm/llvm-project/issues/105183>`__",""
49
49
"`P2440R1 <https://wg21.link/P2440R1>`__","``ranges::iota``, ``ranges::shift_left`` and ``ranges::shift_right``","2022-02 (Virtual)","|Partial|","","`#105184 <https://github.com/llvm/llvm-project/issues/105184>`__","Only ``ranges::iota`` is implemented."
// Such reference binding used to cause hard error for these constructors before C++23 due to CWG1696.
39
+
40
+
#include<array>
41
+
#include<complex>
42
+
#include<tuple>
43
+
#include<utility>
44
+
45
+
#include"test_macros.h"
46
+
47
+
voidverify_two_arguments() {
48
+
std::pair<constlong&, int&&> p1{'a', 'b'};
49
+
#if TEST_STD_VER >= 23
50
+
// expected-error@-2 {{call to deleted constructor of 'std::pair<const long &, int &&>'}}
51
+
#else
52
+
// expected-error@*:* {{reference member 'first' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
53
+
// expected-error@*:* {{reference member 'second' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
54
+
#endif
55
+
56
+
#if TEST_STD_VER >= 23
57
+
std::pair<constlong, int&&> p2({42L}, 'c');
58
+
// expected-error@-1 {{call to deleted constructor of 'std::pair<const long, int &&>'}}
59
+
std::pair<constlong&, int> p3{'d', {}};
60
+
// expected-error@-1 {{call to deleted constructor of 'std::pair<const long &, int>'}}
61
+
#endif
62
+
}
63
+
64
+
voidverify_pair_const_lvalue() {
65
+
const std::pair<char, int> src1{'a', 'b'};
66
+
std::pair<constlong&, constint&> dst1 = src1;
67
+
(void)dst1;
68
+
#if TEST_STD_VER >= 23
69
+
// expected-error@-3 {{invokes a deleted function}}
70
+
#else
71
+
// expected-error@*:* {{reference member 'first' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
72
+
#endif
73
+
74
+
const std::pair<long, char> src2{'a', 'b'};
75
+
std::pair<constlong&, constint&> dst2 = src2;
76
+
(void)dst2;
77
+
#if TEST_STD_VER >= 23
78
+
// expected-error@-3 {{conversion function from 'const pair<long, char>' to 'pair<const long &, const int &>' invokes a deleted function}}
79
+
#else
80
+
// expected-error@*:* {{reference member 'second' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
// expected-error@-3 {{invokes a deleted function}}
90
+
#else
91
+
// expected-error@*:* {{reference member 'first' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
// expected-error@-3 {{invokes a deleted function}}
99
+
#else
100
+
// expected-error@*:* {{reference member 'second' binds to a temporary object whose lifetime would be shorter than the lifetime of the constructed object}}
0 commit comments