diff options
| author | Martin Hořeňovský | 2018-04-03 23:28:14 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2018-04-04 11:14:19 +0200 |
| commit | 1ca8f43b011ad61f4627a3339333406f15a46431 (patch) | |
| tree | ef0d6401e8edb449ccd77fbbbd6edda177d4f13d /projects/SelfTest/UsageTests/ToStringTuple.tests.cpp | |
| parent | dfb83f20e903aa5efb75b1853c89bf7dd815a9ff (diff) | |
| download | catch3-1ca8f43b011ad61f4627a3339333406f15a46431.tar.gz | |
Add PredicateMatcher that takes an arbitrary predicate functions
Also adds `Predicate` helper function to create `PredicateMatcher`.
Because of limitations in type inference it needs to be explicitly
typed, like so
`Predicate<std::string>([](std::string const& str) { ... })`.
It also takes an optional second argument for description of the
predicate.
It is possible to infer the argument with sufficient TMP, see
https://stackoverflow.com/questions/43560492/how-to-extract-lambdas-return-type-and-variadic-parameters-pack-back-from-gener/43561563#43561563
but I don't think that the magic is worth introducing ATM.
Closes #1236
Diffstat (limited to 'projects/SelfTest/UsageTests/ToStringTuple.tests.cpp')
0 files changed, 0 insertions, 0 deletions