[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 11 06:37:09 PST 2024
================
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12
#endif
}
+namespace dr2137 { // dr2137: 18
+#if __cplusplus >= 201103L
+ struct Q {
+ Q();
+ Q(Q&&);
+ Q(std::initializer_list<Q>) = delete; // expected-note 2 {{has been explicitly marked deleted here}}
+ };
+
+ Q x = Q { Q() }; // expected-error {{call to deleted constructor}}
----------------
Endilll wrote:
Can you redo `expected` directives, so that they are consistent with the rest of the file?
https://github.com/llvm/llvm-project/pull/77768
More information about the cfe-commits
mailing list