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

Closes #2207
This commit is contained in:
Martin Hořeňovský 2021-11-15 23:27:17 +01:00
parent dba29b60d6
commit f2f0dcc511
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 14 additions and 0 deletions

View File

@ -104,6 +104,20 @@ Both of these solutions have their problems, but should let you wring parallelis
## 3rd party bugs ## 3rd party bugs
This section outlines known bugs in 3rd party components (this means compilers, standard libraries, standard runtimes). 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 ### 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: 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 ```cpp