================
@@ -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'}}
----------------
Sirraide wrote:
This is a good candidate for nesting; I’ll make a note of this one somewhere.
For now I think it’s fine to just emit the error (I’m very busy this week
unfortunately, but I’m planning to open a pr for it next week if nothing gets
in the way).
https://github.com/llvm/llvm-project/pull/144836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits