AutosarC++19_03-A18.9.2¶
Forwarding values to other functions shall be done via: (1) std::move if the value is an rvalue reference, (2) std::forward if the value is forwarding reference
Required inputs: IR
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
forwarding_forwarding_reference |
Use std::forward if the value is a forwarding reference. |
None |
False |
forwarding_rvalue_reference |
Use std::move if the value is a rvalue reference. |
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
allow_forward_decltype¶
allow_forward_decltype : bool = False
decltype(..Template-Parameter..) as a
forwarding reference and do not produce violations on
std::forward(...) .