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

summaryrefslogtreecommitdiffhomepage
path: root/docs/contributing.md
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-08-19 19:16:12 +0200
committerMartin Hořeňovský2021-08-19 19:16:12 +0200
commitca8546efc6ef916baba611d0a69ebfc88bf0129a (patch)
tree8e39c790cf11dbd036f890a4e107863ffb3e67b4 /docs/contributing.md
parent4113a12c69809d72a3d92345ec47ccc5a0bf141c (diff)
downloadcatch3-ca8546efc6ef916baba611d0a69ebfc88bf0129a.tar.gz
Mention C++14 baseline in contributing documentation
Diffstat (limited to 'docs/contributing.md')
-rw-r--r--docs/contributing.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/contributing.md b/docs/contributing.md
index f70b1e45..fd45cc44 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -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 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