mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Mention C++14 baseline in contributing documentation
This commit is contained in:
parent
4113a12c69
commit
ca8546efc6
@ -190,6 +190,24 @@ If want to contribute code, this section contains some simple rules
|
|||||||
and tips on things like code formatting, code constructions to avoid,
|
and tips on things like code formatting, code constructions to avoid,
|
||||||
and so on.
|
and so on.
|
||||||
|
|
||||||
|
### C++ standard version
|
||||||
|
|
||||||
|
Catch2 currently targets C++14 as the minimum supported C++ version.
|
||||||
|
Features from higher language versions should be used only sparingly,
|
||||||
|
when the benefits from using them outweight the maintenance overhead.
|
||||||
|
|
||||||
|
Example of good use of polyfilling features is our use of `conjunction`,
|
||||||
|
where if available we use `std::conjunction` and otherwise provide our
|
||||||
|
own implementation. The reason it is good is that the surface area for
|
||||||
|
maintenance is quite small, and `std::conjunction` can directly use
|
||||||
|
compiler built-ins, thus providing significant compilation benefits.
|
||||||
|
|
||||||
|
Example of bad use of polyfilling features would be to keep around two
|
||||||
|
sets of metaprogramming in the stringification implementation, once
|
||||||
|
using C++14 compliant TMP and once using C++17's `if constexpr`. While
|
||||||
|
the C++17 would provide significant compilation speedups, the maintenance
|
||||||
|
cost would be too high.
|
||||||
|
|
||||||
|
|
||||||
### Formatting
|
### Formatting
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user