Classes defined inside functions, called local classes, are only visible within those functions. They have advantages in some situations, but if they're just being used as functors, lambdas are preferred.
This rule raises an issue when a ``++class++`` or ``++struct++`` is defined inside a function.
== Noncompliant Code Example
----
void doSomething() {
struct something { // Noncompliant
int a;
};
//...
}
== Compliant Solution