It was used in checking that types in TEMPLATE_TEST_CASE and friends
were unique, but this was removed for v2.8.0 (#1628). Since there
are no further uses of this trait, the simplest thing to do is to
just remove it.
Fixes#1757
The leading/trailing whitespace is problematic because of e.g.
`WHEN` macro having preceeding whitespace for alignment, and it is
generally messy.
Credits to Phil who did lot of the original work.
Closes#1708
This way it is explicit when there is a `StringRef` -> `std::string`
conversion and makes it easier to look for allocations that could
be avoided.
Doing this has already removed one allocation per registered test
case, as there was a completely pointless `StringRef` -> `std::string`
conversion when parsing tags of a test case.
The old code was a left-over from the times when the
`capturedExpression` member was a `const char*`, which could always
be indexed. With the change to use `StringRef`, blindly indexing 0th
element is invalid, as it is not indexable part of a StringRef.
The parameter given to `convert` may not be copyable therefore it has to be
captured by const reference. For example an `std::tuple` that contains a
non-copyable type is itself non-copyable.
The NonDefaultConstructible test-case was reduced by one example type
because it did not add any value.
`print` version of the logging functions supports `printf`-like
formatting, which we do not use and given our current debug print
internals, will never use. This should be slightly more efficient
and expresses the intent better.
This PR ultimately does 3 things
* Separately tracks matched tests per each filter part (that is, a set of filters separated by an OR (`,`)), which allows Catch2 to report each of the alternative filters that don't match any tests.
* Fixes `-w NoTests` to return non-zero in the process
* Adds tests for `-w NoTests`.
Noticed that the code was originally concatenating strings just to
then append the result to another string. Now it does not create
temporaries and also preallocates the string buffer.
* Fix non-default-constructible type lists used in TEMPLATE_LIST_TEST_CASE
std::tuple is not default constructible when the first type is not
default-constuctible. Therefore it can not be instantiated.
to circumvent this, we have to use std::declval in the unevaluate decltype
context.