Compiler Error C2722


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Compiler Error C2722.

operator' : illegal following operator command; use 'operator operator'

An operator statement redefines ::new or ::delete. The new and delete operators are global, so the scope resolution operator (::) is meaningless. Remove the :: operator.