Commit Graph

4 Commits

Author SHA1 Message Date
Herb Sutter
c16e4ce59f Replace GSL_CONTRACT_CHECK with contract_group 2020-11-27 16:33:12 -08:00
Herb Sutter
b34dc221a1 Remove GSL_ASSUME (unused code)
This is not specified in the C++ Core Guidelines as part of GSL, so it should not be documented or supported with a GSL name. And since we don't use it in the GSL repo either, we should just remove it directly. For more about why assumptions are a dangerous blunt instrument, including that they actively eliminate contracts checks including GSL's `Expects` and `Ensures`, see [P2064](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2064r0.pdf).
2020-11-27 11:10:53 -08:00
Herb Sutter
c20a54c8e7 Remove __builtin_expect prediction assistance
In microbenchmarks I tried, using `__builtin_expect` to indicate which branch was likely/unlikely was never faster, and often slower, than just omitting. In GSL, this is used only for `Expects` and `Ensures` which are nearly always true, and all processors have long been great at predicting such branches well.
2020-11-27 11:07:55 -08:00
Jordan Maples [MSFT]
a150aaa4ed
renaming main logic files. Added warning message of the removal and include passthrough. Renamed includes in the source files. Ran Clang-Format (#946)
Header rename
2020-10-29 17:38:48 -07:00