Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/UsageTests/ToStringVector.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2018-04-03 23:28:14 +0200
committerMartin Hořeňovský2018-04-04 11:14:19 +0200
commit1ca8f43b011ad61f4627a3339333406f15a46431 (patch)
treeef0d6401e8edb449ccd77fbbbd6edda177d4f13d /projects/SelfTest/UsageTests/ToStringVector.tests.cpp
parentdfb83f20e903aa5efb75b1853c89bf7dd815a9ff (diff)
downloadcatch3-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/ToStringVector.tests.cpp')
0 files changed, 0 insertions, 0 deletions