Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Add VS2015 + char literals in GENERATE issue to known-limitations

Closes #2207
Commit
f2f0dcc5113fe3f262e5b81c6b6d9846ebe665a2
Author
Martin Hořeňovský ·
Parents
dba29b60d639

Files · Download .tar.gz

Changes

 docs/limitations.md | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/docs/limitations.md b/docs/limitations.md
index 65483b87..b17369b3 100644
--- a/docs/limitations.md
+++ b/docs/limitations.md
@@ -104,6 +104,20 @@ Both of these solutions have their problems, but should let you wring parallelis
 ## 3rd party bugs
 This section outlines known bugs in 3rd party components (this means compilers, standard libraries, standard runtimes).
 
+### Visual Studio 2015 -- `GENERATE` does not compile if it would deduce char array
+
+VS 2015 refuses to compile `GENERATE` statements that would deduce to a
+char array with known size, e.g. this:
+```cpp
+TEST_CASE("Deducing string lit") {
+    auto param = GENERATE("start", "stop");
+}
+```
+
+A workaround for this is to use the `as` helper and force deduction of
+either a `char const*` or a `std::string`.
+
+
 ### Visual Studio 2017 -- raw string literal in assert fails to compile
 There is a known bug in Visual Studio 2017 (VC 15), that causes compilation error when preprocessor attempts to stringize a raw string literal (`#` preprocessor is applied to it). This snippet is sufficient to trigger the compilation error:
 ```cpp