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

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-02-18 23:31:16 +0100
committerMartin Hořeňovský2020-02-20 13:03:30 +0100
commitcf6575576f1c5b84b9148d47e96027e39915e132 (patch)
treef756264c02c5915c6d276dfb8ccbf2fe2cd231d0 /docs
parenta1be19aa1bfcabcbd28e442c0878c1a9468e83e5 (diff)
downloadcatch3-cf6575576f1c5b84b9148d47e96027e39915e132.tar.gz
Start fixing up Matchers: namespaces, composition ops
This commit also forbids composing lvalues of composed matchers, as per previous deprecation notice. I do not expect this to be contentious in practice, because there was a bug in that usage for years, and nobody complained.
Diffstat (limited to 'docs')
-rw-r--r--docs/deprecations.md28
-rw-r--r--docs/release-notes.md1
2 files changed, 1 insertions, 28 deletions
diff --git a/docs/deprecations.md b/docs/deprecations.md
index ca277d7e..c0e51b46 100644
--- a/docs/deprecations.md
+++ b/docs/deprecations.md
@@ -9,34 +9,6 @@ either of these is a breaking change, and thus will not happen until
at least the next major release.
-### Composing lvalues of already composed matchers
-
-Because a significant bug in this use case has persisted for 2+ years
-without a bug report, and to simplify the implementation, code that
-composes lvalues of composed matchers will not compile. That is,
-this code will no longer work:
-
-```cpp
- auto m1 = Contains("string");
- auto m2 = Contains("random");
- auto composed1 = m1 || m2;
- auto m3 = Contains("different");
- auto composed2 = composed1 || m3;
- REQUIRE_THAT(foo(), !composed1);
- REQUIRE_THAT(foo(), composed2);
-```
-
-Instead you will have to write this:
-
-```cpp
- auto m1 = Contains("string");
- auto m2 = Contains("random");
- auto m3 = Contains("different");
- REQUIRE_THAT(foo(), !(m1 || m2));
- REQUIRE_THAT(foo(), m1 || m2 || m3);
-```
-
-
## Planned changes
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 4d385cf6..ae06c9e7 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -53,6 +53,7 @@
* The description type now must be a `const char*` or implicitly convertible to it
* The `[!hide]` tag has been removed.
* Use `[.]` or `[.foo]` instead.
+* Lvalues of composed matchers cannot be composed further
### Fixes
* The `INFO` macro no longer contains superfluous semicolon (#1456)