Category: Proxy usage

Q

C2679: binary '==': no operator found which takes...

A

In all likelihood, you attempted to compare a proxy instance with NULL, that is the C++ 'NULL', not the proxy null. The full compiler error message of Visual C++ is:

error C2679: binary '==' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion) c:\temp\jc2.1\xmog\staging\examples-c++\arrays\main.cpp 68

This compiler error was introduced intentionally in version 3.2.10 to guard against an unintentional conversion operation from taking place when the developer erroneously uses NULL instead of null. In versions before 3.2.10, a comparison with NULL would compile but then have undesired behavior at runtime.

Please see the FAQ on null for more details.


Copyright 2006-2011 by Codemesh, Inc., ALL RIGHTS RESERVED

:
frequently asked questions
home products support customers partners newsroom about us contact us