Skip to content

Commit 3180bfb

Browse files
committed
Update A7-1-1 test for the exclusion of rvalue references.
1 parent 304c75a commit 3180bfb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cpp/autosar/test/rules/A7-1-1/test.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,16 @@ template <bool... Args> extern constexpr bool recurse_var = true; // COMPLIANT
8383
template <bool B1, bool... Args>
8484
extern constexpr bool recurse_var<B1, Args...> = B1 &&recurse_var<Args...>;
8585

86-
void fp_621() { recurse_var<true, true, true>; }
86+
void fp_621() { recurse_var<true, true, true>; }
87+
88+
#include <utility>
89+
90+
void variadic_forwarding() {}
91+
92+
template <typename T, typename... Args>
93+
void variadic_forwarding(T &&first, Args &&...rest) {
94+
first;
95+
variadic_forwarding(std::forward<Args>(rest)...);
96+
}
97+
98+
int test_variadic_forwarding() { variadic_forwarding(1, 1.1, "a"); }

0 commit comments

Comments
 (0)