================
@@ -99,6 +127,14 @@ static_assert(std::is_trivially_copyable_v<int&>);
 // expected-note@-1 {{'int &' is not trivially copyable}} \
 // expected-note@-1 {{because it is a reference type}}
 
+static_assert(std::is_assignable<int&, int>::value);
+
+static_assert(std::is_assignable<int&, void>::value);
+// expected-error-re@-1 {{static assertion failed due to requirement 
'std::{{.*}}is_assignable<int &, void>::value'}} \
+// expected-error@-1 {{assigning to 'int' from incompatible type 'void'}}
----------------
rkirsling wrote:

Right, at first I wondered if I needed to recapitulate all of these existing 
diagnostic messages somehow, just to ensure that it would all be `note`s 
against a single `error`. But it 
[appears](https://github.com/llvm/llvm-project/pull/144220/files#diff-9e681885bce5b9efd3dba53a469fb788e863d7d5f76c657232ea4c62a4147ab4)
 that `is_constructible` is also incurring a second `error` (via 
`InitializationSequence::Diagnose`).

https://github.com/llvm/llvm-project/pull/144836
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to