Commit Graph

1951 Commits

Author SHA1 Message Date
Juha Reunanen
b933a61940
C.31: Improve language just a bit (#1772) 2021-04-06 09:45:23 -04:00
Juha Reunanen
c3baa7ce8b
C.66: Improve language just a bit (#1771) 2021-04-06 09:44:53 -04:00
Juha Reunanen
652b71b2c0
F.20: Improve language just a bit (#1768) 2021-04-05 22:24:33 -04:00
Juha Reunanen
402565d74e
F.52: Improve language just a bit (#1770) 2021-04-05 22:22:05 -04:00
Sergey Zubkov
077a29ee3c CI fixes 2021-04-05 15:11:05 -04:00
Herb Sutter
7849d7e7c4 Added F.56, closes #1752 2021-04-01 21:22:44 -07:00
Herb Sutter
77b4175785 Added C.12 to discourage const/reference data members
Would have been nice to put this after C.9 but item numbers are dense
around here.
2021-04-01 12:12:03 -07:00
Herb Sutter
4498e078e7 Refined spec for narrow to cover signedness promotions, closes #1726 2021-04-01 12:01:33 -07:00
Herb Sutter
c8e72981c4 Fixed misapplied edit for <=> 2021-04-01 11:41:27 -07:00
Herb Sutter
4f6e11940e Added bad/good example for C.89, closes #1727 2021-04-01 11:37:58 -07:00
nullptr-cpp
8bdb8fe0dc
Add '<=>' to comparison operators related rules (C.87, C.167) (#1759)
* Add '<=>' to comparison operators related rules (C.87, C.167)

C++20's three-way comparison operator should respect the same rules as other
comparison operators.

* Fix a minor typo

Co-authored-by: Jonathan Wakely <github@kayari.org>

Co-authored-by: Jonathan Wakely <github@kayari.org>
2021-04-01 11:12:18 -07:00
nullptr-cpp
5f75ea4b4b
C.63: Fix a minor typo (#1760)
In accordance with the title at line 4568, use `const&` instead of `const &`.
2021-03-25 11:08:46 -07:00
Sergey Zubkov
af44f95577 and another fix to md-split.py for CI 2021-03-18 13:19:45 -04:00
Sergey Zubkov
f36b3ccaa4 fix md-split.py for CI 2021-03-18 12:19:36 -04:00
Sergey Zubkov
1dd82988d7 make CI happier 2021-03-11 15:21:49 -05:00
Sergey Zubkov
ee28f50025 dict update for CI 2021-03-11 15:12:00 -05:00
Herb Sutter
4f0659fb75 Added CP.coro and CP.51, closes #1756 2021-03-11 11:37:45 -08:00
Herb Sutter
ccb7eff4ec CP.1: Made "bad" example consistent with now-updated "good" example 2021-03-11 11:07:31 -08:00
Martin
ffeca2a254
Change comparison to use int instead of double (#1758)
This allows the example to remain simple well not misleading a beginner
such a comparison is safe. Including an epsilon comparison or something
similar would overly complicate this example.

Co-authored-by: Martin O'Shea <martin.oshea@native-instruments.com>
2021-03-11 11:05:59 -08:00
JuliusBrueggemann
1caef9a7f1 Use the same phrasing in index and actual rule 2021-02-24 11:06:22 +00:00
Herb Sutter
c57e95d1c8 Clarify meaning of "inline" in F.5, closes #1731 2021-02-18 11:33:58 -08:00
Herb Sutter
fa56634596 Add local lambdas and variable templates to T.61: Closes #1742 2021-02-18 11:29:49 -08:00
Herb Sutter
64ab13b3d0 Closes #1748 2021-02-18 11:20:09 -08:00
Herb Sutter
a97be2d528 Addresses #1732 2021-02-11 11:57:50 -08:00
Sergey Zubkov
3e61563a0c make hunspell happy 2021-01-28 22:16:03 -05:00
Herb Sutter
75cc9a102f Improves I.24 rule wording, closes #1733 2021-01-28 11:53:10 -08:00
Herb Sutter
caab79d1e9 Improving the wording of I.25 per #1734 2021-01-28 11:46:27 -08:00
Herb Sutter
f46ce437e0 Slightly improved F.20 to highlight the note about const return values 2021-01-28 11:36:40 -08:00
syntroniks
a5a4d0b4a2
update Enum.7 note with consistent capitalization (#1739) 2021-01-28 13:57:07 -05:00
Sergey Zubkov
f6f1a49a41 typo 2021-01-24 22:32:35 -05:00
Herb Sutter
3c1991b87b Updated T.68 example 2021-01-21 11:46:01 -08:00
Herb Sutter
520ac9c695 Updated the new ES.3
Added xref, massaged summary.
2021-01-21 11:43:50 -08:00
shaneasd
627ed66ce6
Update reference to SF.7 to match text (#1735) 2021-01-21 11:39:04 -08:00
Florian Behrens
c142bc9d7e
Improve example in CP.4 to not contradict F.53. (#1724)
Changed the example so that objects are not passed by reference to other thread contexts (though threads are properly synchronized).
2021-01-21 11:38:19 -08:00
peno2
b5412f5922
Add new rule ES.3 Don't repeat yourself (#1715)
* Add new rule ES.3 Don't repeat yourself

* Replace function example with more inclusive/neutral language

Add a reference to topic on libraries.
2021-01-21 11:13:45 -08:00
Sergey Zubkov
2c95a33fef travis CI fixes 2020-12-16 23:14:07 -05:00
David Leal
cef2f6bb77
Replace Travis CI with GitHub Actions (#1688) 2020-12-16 23:06:38 -05:00
Niels Dekker
e2c0f23ce1
F.60: Remove C-style cast (T&) from example of invalid C++ (#1711) 2020-11-16 11:07:56 -05:00
Herb Sutter
a6eb40c5a2 Improved F.7 lifetime note; closes #1698 2020-10-29 11:57:25 -07:00
Herb Sutter
5fdddf821d Added a justification message option for gsl::suppress
Closes #1703
2020-10-29 11:37:08 -07:00
Herb Sutter
53aaebb074 Updated Mozilla link and Google style guide C++ version note
Closes #1705
2020-10-29 11:21:25 -07:00
Fernando J. Iglesias García
525d8f225e
Update C.83 with swap for resource mgmt. (#1694)
* Update C.83 with swap for resource mgmt.

The swap is useful to implement assignments idiomatically (e.g. copy-swap idiom).

With the current enforcement, to non-virtual classes, very simple classes (e.g. `trivially_copyable`, a struct encapsulating an stl container) are suggested to have a swap. This suggestion can be argued wrong since for very simple classes copy-swap idiom is not efficient (the creation of a third object on assignment is not needed, which copy-swap does).

* Rework C.83 according to PR comments.
2020-10-29 11:12:40 -07:00
Sergey Zubkov
840fa592ac
merge C.150 in R.23, leaving a redirect behind (#1676) 2020-10-05 15:09:08 -04:00
hsutter
dd98129f40 Fixes example in ES.105, closes #1678 2020-10-01 11:48:22 -07:00
hsutter
6ad29ce609 Fixes ES.50 example and closes #1682
Also removes the only use of `decltype` in the Guidelines, FTW.
2020-10-01 11:30:30 -07:00
Herb Sutter
55bea2089b
Remove string_span, recommend using std::string_view, std:::span,<char> or gsl::span<char> instead (#1680) 2020-10-01 11:23:58 -07:00
Herb Sutter
146864fe89
Cleaned up casting guidance (#1685)
The various guidelines now have consistent Enforcements.
All C-style casts are now consistently banned, including to `(void)`.
Cast to `(void`)` should be `std::ignore =` instead.
All functional-style casts are now consistently banned,  instead of
`T(x)` use `T{x}`.
2020-10-01 11:18:38 -07:00
Sergey Zubkov
86102531dc
merge C.151 into R.22, leaving a redirect behind (#1675) 2020-10-01 11:10:13 -07:00
Sergey Zubkov
30b41c32e3
merge R.30 and F.7, closes #1671 (#1674) 2020-10-01 11:09:24 -07:00
hsutter
c86be249f3 Revert "Revert "Revert "Removed gsl::string_span, recommend using std::string_view, std::span<char>, or gsl::span<char> instead"""
This reverts commit 8241609450.
2020-09-23 15:41:22 -07:00