Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
TestHelperVariadic_test Class Reference

Description

Test:
document usage of the diagnostics helper for variadic templates. Errors in variadic template instantiations are sometimes hard to spot, due to the intricacies of template argument matching and the reference collapsing rules. Our diagnostics facility is itself a variadic function template, which, when supplied with an argument pack, will build a diagnostic string describing the arguments.
Warning
care has to be taken to pass the template arguments properly, since template argument matching might mess up the reference kind (rvalue, lvalue) of the passed types. Thus, either use std::forward, or spell out the template argument(s) explicitly on invocation
See also
showVariadicTypes()
TestHelper_test

Definition at line 90 of file test-helper-variadic-test.cpp.

Private Member Functions

virtual void run (Arg)
 
template<typename... ARGS>
void forwardFunction (string id, ARGS &&... args)
 this dummy simulates a typical variadic call which takes all arguments as '&&' for the purpose of "perfect forwarding"
 

Member Function Documentation

◆ run()

virtual void run ( Arg  )
inlineprivatevirtual

Definition at line 94 of file test-helper-variadic-test.cpp.

References TestHelperVariadic_test::forwardFunction(), and lib::test::showVariadicTypes().

+ Here is the call graph for this function:

◆ forwardFunction()

template<typename... ARGS>
void forwardFunction ( string  id,
ARGS &&...  args 
)
inlineprivate

this dummy simulates a typical variadic call which takes all arguments as '&&' for the purpose of "perfect forwarding"

Definition at line 118 of file test-helper-variadic-test.cpp.

References lib::test::showVariadicTypes().

Referenced by TestHelperVariadic_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for TestHelperVariadic_test:
+ Collaboration diagram for TestHelperVariadic_test:

The documentation for this class was generated from the following file: