AutosarC++18_10-A8.4.6

“forward” parameters declared as T && shall always be forwarded

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

incorrect_forward_used

Wrong template type argument used in instantiation of std::forward

None

False

only_forward

“forward” parameters shall always be forwarded.

None

False

Options

check_template_type_argument_to_std_forward

check_template_type_argument_to_std_forward : bool = False

Whether the rule should check if template type argument to std::forward is appropriate for the parameter, i.e., the rule would flag using forward as in the following example:
void foo( T && t1)
{
    bar( std::forward< Other_Type_Than_T >( t1 ) );
}