[cfe-dev] Trying to work on "C++ Type-checking for copy assignment" project

Vyacheslav Kononenko vyacheslav at kononenko.net
Sat May 16 11:07:42 PDT 2009


> But implicit assignment operators are not user-defined. I just wonder
> how hard we should try in making POD types feel like built-ins.
You mean by behavior or error message should be the same as for
builtin? I think implicit assignment operator should provide the same
behavior.

> I'm not sure, but I don't think our lookup automatically limits it to
> those operators that are viable for the left-hand side, so we'd have to
> filter all others out manually. We certainly don't want every possible
> assignment operator in that list.
No, of course not. Only assignment operators from the class and
parents. Yes that will require filtering the list. Another idea is to
print "incompatible type" message when there is only one assignment
operator available. That will require filtering that list as well.

> Please do, and update the old test cases, and resend the patch. I'll
> commit it. We can do minor improvements later.

New patch is attached. I also added some test cases for compound
assignment operator.

Thanks,
Vyacheslav
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 4685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090516/38a741b7/attachment.obj>


More information about the cfe-dev mailing list