'token' : illegal following '~' (expected identifier)
The token is not an identifier.
Example
class C { C::~operator int(); // error ~C(); // OK, destructor declaration };