== Why is this an issue?

Setting method parameter defaults seems like a tidy way to make a method more usable. However, function pointers to methods with defaulted parameters can be confusing, because the function signature may not seem to match the call signature. Therefore, the use of multiple, overloaded methods is preferred.


=== Noncompliant code example

[source,cpp]
----
void HelloWorld (string name="World")
{
    cout << "Hello " << name << endl;
}
----


=== Compliant solution

[source,cpp]
----
void HelloWorld (string name)
{
    cout << "Hello " << name << endl;
}

void HelloWorld ()
{
    HelloWorld("World");
}
----

== Resources

=== Related rules

* S3719



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

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

=== Message

Add an overloaded method to define [parameter name|parameter number n]


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

=== is related to: S3719

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