You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to invoke the SingleValueGenerator (using external variables) inside GENERATE_COPY like so...
int a = 1;
int b = 2;
int c = GENERATE_COPY( a,b );
results in a compilation error:
error: no matching function for call to 'Catch::Generators::GeneratorWrapper<const int&>::GeneratorWrapper(Catch::Generators::GeneratorWrapper<const int>)'
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
Expected behavior
The above example code should compile fine, since GENERATE_COPY should allow the use of external variables (a and b) in any generator. For example, the following code compiles totally fine (using RangeGenerator):
int a = 1;
int b = 2;
int c = GENERATE_COPY( range(a,b) );
…n forward was needed. Correct some missing universal references in method parameter lists. Add IntrospectiveTest to verify fix for issue catchorg#1809.
Describe the bug
Attempting to invoke the
SingleValueGenerator
(using external variables) insideGENERATE_COPY
like so...results in a compilation error:
Expected behavior
The above example code should compile fine, since
GENERATE_COPY
should allow the use of external variables (a
andb
) in any generator. For example, the following code compiles totally fine (usingRangeGenerator
):Reproduction steps
self-contained code
bugdemo.cpp
:and compiled simply with
Platform information:
The text was updated successfully, but these errors were encountered: