Commit Graph

1866 Commits (ac7079b0125179b4e1d4ac0f9ec94e34b8c09c00)
 

Author SHA1 Message Date
Sergey Zubkov ac7079b012 travis CI fix 6 years ago
Arthur O'Dwyer 567331ab4e
Const-qualify operator()s. NFC. (#1638)
As a general rule, `operator()` should be const-qualified.
The exceptions are few and far between.

I was actually looking for a Guideline on that subject;
I grepped for `operator()` and found that not only is there
no such Guideline yet, the doc actually contained these
places that (needlessly) violated the general rule.
6 years ago
Arthur O'Dwyer c379d3f6ea
Remove a broken example, and copyedit. (#1637)
Using `this` in a free function makes the program ill-formed;
it doesn't magically give you a `std::thread*`.
6 years ago
Sergey Zubkov 45ad5c4628 C.49: fix typo in example (closes #1642) 6 years ago
Manlio Morini 2477f275dc
Fixed broken link (Res-nonnegative) (#1641) 6 years ago
Sergey Zubkov 8b94f6ee58 I.9: update outdated note that talks of 2018 as the future, closes #1525 6 years ago
Sergey Zubkov 62be4c856d ES.28: drop broken and unnecessary example, closes #1590 6 years ago
Anthony Cassidy 9efcaf07f7
Removed anti-CamelCase comments. (#1632)
The comments were:
// ???Must we suffer CaMelcAse???
and
// ugly CaMeLcAsEvArIaBlE
6 years ago
xtofl 4867a5c2d3
Use '<thing> template' i.s.o. 'template <thing>' (#1631)
* Use '<thing> template' i.s.o. 'template <thing>'

The word 'template' is often wrongly used as an adjective to the 'thing'
it becomes when instantiated.

* Expand succinct formulation for readability

Co-authored-by: Kristoffel Pirard <kristoffel.pirard@vanhool.com>
6 years ago
rico-chet 1936cb6b44
[NL.{11,15}] Bring rules in order (#1629)
The rules NL.11 (Make literals readable) and NL.15 (Use spaces
sparingly) are placed in inverted order in the text flow, swap them.
6 years ago
Sergey Zubkov 4625c984e9 bump date 6 years ago
Sergey Zubkov 24c3993e97 fix CI, fix heading and add comment requested at today's editor's call 6 years ago
Arthur O'Dwyer d56d67969c
Expand CP.61 to talk about the general "factory" pattern. (#1621) 6 years ago
Arthur O'Dwyer e8e0d103c0
CP.1: Simplify example, show good example, expand on rationale (#1615)
"Make your code thread-safe" usually means "don't use global state."
Advice to replace global state with `thread_local` state is usually misguided.
https://quuxplusone.github.io/blog/2018/11/14/fiber-local-storage/
6 years ago
Hyuk Myeong 19f2672b9e
Adjust the spacing for consistency (#1626)
* Adjust the spacing for consistency

* Adjust the spacing for consistency-2
6 years ago
rico-chet 9960c7dd7f
[SF.10] Fix annotation of the _bad_ example (#1627)
The _bad_ example wasn't annotated as such and a perfectly fine function
name was marked bad.

Annotate the example as bad and remove the misleading function name
annotation.
6 years ago
Moritz 'Morty' Strübe f604a6b5d6
[F.36] Typo (missing s) (#1623) 6 years ago
Arthur O'Dwyer 6e0f8ace0b
Tweak one of ES.10's examples for verisimilitude. (#1611)
For some reason the trailing `e = 3` seemed more of a red flag
than anything else about this line. Let's imply that the programmer
is trying to make some constants for hexadecimal translation.
6 years ago
Dale Visser 46dadd0b16
Modified slightly impolite language (#1601)
* dumb -> inefficient
6 years ago
Yaro Shkvorets 97797870ad
code typo in R.20 (#1619) 6 years ago
Sergey Zubkov 986402298a travis CI fixes 6 years ago
Arthur O'Dwyer d45496ff5e
You should never =delete a destructor! (#1605) 6 years ago
Sergey Zubkov 9928c95f97 typos, wording, links (closes #1529) 6 years ago
hsutter b4bb11a833 Tweak to close #1588 6 years ago
shaneasd 040b141acf
Clarify ES.48 enforcement rule for void cast of [[nodiscard]] (#1588) 6 years ago
hsutter 1ca5545ce1 Followup to close #1586 6 years ago
Akash Mozumdar 6f01c706a8
Actually detect negative sizes by following ES.106 (#1586)
* Actually detect negative sizes by following ES.106

And don't use senseless one letter names

* fix grammar

Co-Authored-By: Johel Ernesto Guerrero Peña <johelegp@gmail.com>

Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
6 years ago
Sylwester Fraczek d2be4cba57
F.21 remove `;` in function definition (#1592) 6 years ago
Sergey Zubkov ab91388efd
fix mismatched anchors, closes #1569 (#1581) 6 years ago
Akash Mozumdar aea393c85c
C.180 example bugfix (#1587)
new[] needs delete[]
6 years ago
Adnn 2f0c2e5874
C.22 Fixes a mistake in the code example not making a deep copy (#1573) 6 years ago
hsutter fc383d6641 Updated #1570
Typo
6 years ago
Chris Guzak 63ceef65e3
Add SF.12, 3rd try (#1570)
* add SF.12

* add incscope to isocpp.dic to get the CI build to pass

* expand INCLUDES, update dictionary for the ci build to pass

* pr feedback

* in the same directory

* update based on feedback

* 3rd try

* PR feedback

* update lable

* Update CppCoreGuidelines.md

* Update CppCoreGuidelines.md
6 years ago
hsutter 6388b4d1ea Followup to PR 1564
Changed the two anchors back (anchors need to stay stable and don't
display visibly anyway)
Switched "non-public" back to hyphernated (to use hyphenation
consistently)
6 years ago
Hyuk Myeong ab0255b371
Add and remove hyphens to words that begin with non (#1564)
* Add hyphens to words that begins with a non

* Remove hyphens in nonpublic
6 years ago
roroberto 1429d9ec71
Added example to CP.61: Use an async() to spawn a concurrent task (#1557)
Added example to CP.61: Use an async() to spawn a concurrent task
6 years ago
Herb Sutter 6e72adc0fe
Casting away const isn't undefined behavior, but modifying a constant is (#1509)
* Casting away const isn't undefined behavior, but modifying a constant is

You can cast away `const` as much as you like, as long as you never write to variable.

* rewording for clarification
6 years ago
hsutter 2eb8ea9279 Tweaked #1516 one more time 6 years ago
hsutter fd857db583 Tweak to #1516 per editors call 6 years ago
kuzkry 745b0664c2
clarify that GSL semi-specification of some types does not reflect actual support of them (#1516) 6 years ago
hsutter dc8e49314f Tweaked PR #1553 per editors call 6 years ago
Kim Viggedal 153da17417
Merge I.2 and R.6 seem to address the same issue, (#1553)
thus I propose removing R.6 and moving some of its contents into I.2.
6 years ago
hsutter 9a4db6c1c4 Adopt the change suggested in PR #1556, just making the casing consistent the other way (lowercase) 6 years ago
hsutter b01d9e0d23 Updated MISRA entry with link, updating PR #1554 6 years ago
Mark Nelson 605a48ae03 Added two coding references (#1554)
* Added two commonly used coding guideline documents

* Update CppCoreGuidelines.md
6 years ago
hsutter f92c1c2eb3 Tweaked #1551
To adjust example comment and Enforcement per PR #1551 comments
6 years ago
Baptiste Thémine 164c0b3b5d Add code examples to CppCoreGuidelines ES.77 (#1551) 6 years ago
Hyuk Myeong 5c065f850c Fix typos (#1549)
* R.37 : it callees -> its callees
* ES.65 : a different part from the original paper
6 years ago
Sergey Zubkov c68a395830 [I.27] fix move ctor in the pimpl example (closes #1471) 6 years ago
Sergey Zubkov df94731290 update LLVM coding standards description, closes #1502 6 years ago