From 0685216175f851e47d015408415d61823c6d7c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 28 Oct 2019 15:14:54 +0100 Subject: [PATCH] Mark type erasure in PredicateFunction as deprecated --- docs/deprecations.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/deprecations.md b/docs/deprecations.md index 77830298..c2b178e2 100644 --- a/docs/deprecations.md +++ b/docs/deprecations.md @@ -93,6 +93,17 @@ positively match a testspec. 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`, 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)