AutosarC++18_03-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¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
check_template_type_argument_to_std_forward¶
check_template_type_argument_to_std_forward : bool = False
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 ) );
}