== Why is this an issue?

:operationName: function

include::../description.adoc[]

=== Exceptions

This rule doesn't raise an issue for empty class constructors or destructors.

== How to fix it

=== Code examples

==== Noncompliant code example

[source,cpp,diff-id=1,diff-type=noncompliant]
----
void shouldNotBeEmpty() {  // Noncompliant - method is empty
}

void notImplemented() {  // Noncompliant - method is empty
}

void emptyOnPurpose() {  // Noncompliant - method is empty
}
----

==== Compliant solution

[source,cpp,diff-id=1,diff-type=compliant]
----
void shouldNotBeEmpty() {
  doSomething();
}

void notImplemented() {
  throw std::logic_exception("notImplemented() cannot be performed because...");
}

void emptyOnPurpose() {
  // comment explaining why the method is empty
}
----

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

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

=== Message

Add a nested comment explaining why this method is empty, or complete the implementation.


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

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

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