mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Remove type erasure in predicate matcher
Now the type of the predicate is part of the type of the PredicateMatcher.
This commit is contained in:
@@ -33,16 +33,6 @@ The API for Catch2's console colour will be changed to take an extra
|
||||
argument, the stream to which the colour code should be applied.
|
||||
|
||||
|
||||
### Type erasure in the `PredicateMatcher`
|
||||
|
||||
Currently, the `PredicateMatcher` uses `std::function` for type erasure,
|
||||
so that type of the matcher is always `PredicateMatcher<T>`, regardless
|
||||
of the type of the predicate. Because of the high compilation overhead
|
||||
of `std::function`, and the fact that the type erasure is used only rarely,
|
||||
`PredicateMatcher` will no longer be type erased in the future. Instead,
|
||||
the predicate type will be made part of the PredicateMatcher's type.
|
||||
|
||||
|
||||
---
|
||||
|
||||
[Home](Readme.md#top)
|
||||
|
@@ -44,7 +44,8 @@
|
||||
* If the second argument has text outside tags, the text will be ignored.
|
||||
* Hidden test cases are no longer included just because they don't match an exclusion tag
|
||||
* Previously, a `TEST_CASE("A", "[.foo]")` would be included by asking for `~[bar]`.
|
||||
|
||||
* `PredicateMatcher` is no longer type erased.
|
||||
* This means that the type of the provided predicate is part of the `PredicateMatcher`'s type
|
||||
|
||||
|
||||
### Fixes
|
||||
|
Reference in New Issue
Block a user