:noncompliant: cfamily/noncompliant.adoc
:compliant: cfamily/compliant.adoc

include::../description.adoc[]

=== Exceptions

The rule ignores:

* control flow statements with a single nested statement

[source,cpp]
----
if (condition) doSomething();     // Compliant by exception
while (condition) doSomething();  // Compliant by exception
----

* `case` or `default` statements containing a single statement followed by `break`

[source,cpp]
----
switch (foo) {
  case  0: doSomething(); break;    // Compliant by exception
  default: doSomething(); break;    // Compliant by exception
}
----

* statements enclosed in curly braces on the same line

[source,cpp]
----
auto lambda = [](int x) { doSomething(x); return x; }; // Compliant by exception
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

include::../highlighting.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]

endif::env-github,rspecator-view[]
