<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_matchers_generic.cpp, branch dev-stupid-windows-things</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Add PredicateMatcher that takes an arbitrary predicate functions</title>
<updated>2018-04-04T09:14:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-04-03T21:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=1ca8f43b011ad61f4627a3339333406f15a46431'/>
<id>1ca8f43b011ad61f4627a3339333406f15a46431</id>
<content type='text'>
Also adds `Predicate` helper function to create `PredicateMatcher`.
Because of limitations in type inference it needs to be explicitly
typed, like so
`Predicate&lt;std::string&gt;([](std::string const&amp; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also adds `Predicate` helper function to create `PredicateMatcher`.
Because of limitations in type inference it needs to be explicitly
typed, like so
`Predicate&lt;std::string&gt;([](std::string const&amp; 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
</pre>
</div>
</content>
</entry>
</feed>
