//// This rule is superseded by RSPEC-2583
//// Please consider implementing this latter instead.
According to the {cpp} standard, ``++this++`` can never be null, so comparisons of the two are pointless at best. At worst, because of compiler optimizations, such comparisons could lead to null pointer dereferences or obscure, difficult-to-diagnose errors in production.


This rule raises an issue when ``++this++`` is compared to ``++nullptr++`` or 0 or anything ``++#defined++`` as ``++nullptr++`` or 0, such as ``++NULL++`` in most environments.


== Noncompliant Code Example

----
class MyClass {
  string name;

  string GetName() {
    if (this != 0) {  // Noncompliant
      return name;
    }
    return 0;
  }
}
----


== Compliant Solution

----
class MyClass {
  string name;

  string GetName() {
    return name;
  }
}
----


