Commit Graph

2193 Commits (master)
 

Author SHA1 Message Date
bgloyer 0d70ae927d
SL_3 'Do not add non-standard entities to namespace `std`' add example (#2031)
* SL_3 add example

* Update isocpp.dic

add My_Vector
3 years ago
Henrique Mageste 6a0b5e6eca
Abstract class needs at least one abstract method to be considered abstract (#2053)
The introduction of the method is needed, for instance, for constructions like std::is_abstract<AbstractBase>::value to be evaluated to true
3 years ago
Herb Sutter 696633572c Remove spurious Enforcement, closes #2061 3 years ago
Florian Bramer a3ae12b20e
Fixed typo (#2055)
Section C.21 shows a code example which typed
a class name in two different ways:

- CloneableBase
- ClonableBase

It is easy to overlook but it would not compile.

My commit prefers CloneableBase over ClonableBase and uses just that
name then. I prefered CloneableBase because Java's SDK uses the same
writing, so I guess this can be consired to be more widely used.
3 years ago
Tim Lyon 8e3723f18f
Fix typo (#2051) 3 years ago
Xeverous e80373f226
fix typo in code example in C.43 (#2040) 3 years ago
ancestor-mithril e1a453b0b0
Fix broken anchors (#2038)
* Standard library and GSL anchors do not work anymore.
3 years ago
Chris Cotter 938452179c
Fix minor typo in ES.59 (#2037) 3 years ago
Hyuk Myeong efd59afe9c
Fix typos when using names (#2035)
* Fix typos when using names

* Update isocpp.dic
3 years ago
Sergey 31bb3d1b01
F.10: small code fix 3 years ago
Jonathan Wakely 6d912e8b51
CP.44 improve example and add more accurate discussion (#2028) 3 years ago
Herb Sutter da8a6fbd37 Make C.12 title consistent 3 years ago
Herb Sutter 06fabdc9af Update C.12 to apply to copyable/movable types, closes #2012 3 years ago
Herb Sutter 0bc56ffaa8 s/instead follow/follow/ for #2010 3 years ago
Russell McClellan 1ba3371a0d
Add exceptions to F.15, F.16, and F.18 for `shared_ptr` types (#2010)
Currently these guidelines conflict with R.34, R.35, and R.36.

This conflict has led to confusion, where it's unclear which
guidelines to prefer for `shared_ptr` types.

In a [previous
PR](https://github.com/isocpp/CppCoreGuidelines/pull/1989) I proposed
preferring the "F" series of guidelines.  This PR takes the opposite
approach and prefers the "R" guidelines for `shared_ptr` types.

I don't feel strongly about which guidelines to prefer, I just want to make
sure the guidelines are internally consistent.
3 years ago
Hyuk Myeong fa31c19979
Fix minor typos (#2022)
* Fix minor typos

Fix minor typos

* Update isocpp.dic
3 years ago
Sergey Zubkov 4b706d9d6d satisfy travis ci 3 years ago
Herb Sutter 17b68f14f6 Describe capture-lists and update F.19 forwarding enforcement, updates #2016 and closes #2017 3 years ago
Chris Cotter 1748ebb45a
Editorial - use "capture default" for syntactic element (#2016) 3 years ago
Kimi MA 12ad22b024
non-built-in -> built-in (#2015) 3 years ago
Kimi MA 9028b62106
R.33 add missing space in the title (#2014) 3 years ago
Arkady Shapkin ee8d9ab216
Clarify F.16 enforcement rule about passing by value (#2008) 3 years ago
Sergey Zubkov fb112c7281 make CI happy 3 years ago
Herb Sutter 380a6ff26d Added `span` bounds-checking guarantee and a note about its relationship to `std::span` 3 years ago
Herb Sutter b435cf54a5 Apply edits to close #1984 #2004 #2006
Also removing some stray trailing whitespace on a few unrelated lines
3 years ago
bgloyer ee368e238e
R.20: 'represent ownership' clean up example and enforcement (#1992)
* Clean up R.20 example; enforcement

* Clarified enforcement
3 years ago
Andrey Sikorin b8f13c59a3
Extend "when necessary" explanation (#2000)
* Extend "when necessary" explanation

* Rephrase sentence
3 years ago
Max FERGER ae06b0a056
Per: fix some typos (#1995)
* Per.7: fix typo in example
* Per: improve grammar
* Apply suggestions from code review
3 years ago
Wu Yongwei efc6f6eabe
ES.2: Fix wrong code logic in the example (#1999) 3 years ago
Pluto Yang cf3eacad1a
SL.io.50: missing backticks (#1994) 3 years ago
CFrei 016742b1c0
Fix typo in SL.C.1 link title (#1991) 3 years ago
Niels Dekker bf29c35082
ES.24 (Use a unique_ptr) Example should `delete` the raw pointer (#1986)
Without having a `delete p2` statement at the end, the claim that "the object pointed to by `p2` is leaked" would just seem trivial.
3 years ago
Aditya Ardiya 5c1a2b69fb
Fix typo reference to pro-type-union (#1985)
clang-tidy has [cppcoreguidelines-pro-type-union-access](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.html) that refers to the  pro-type-union. Unfortunately there's an typo. This commit tries to fix the type
3 years ago
Niels Dekker f4a9420e32
R.5 (scoped objects): Do not warn on a const `unique_ptr<T[]>` (#1969)
`unique_ptr<T[]>` is being used in practice to declare a local dynamically allocated buffer.
3 years ago
Niels Dekker 40ce5d12c3
R.5 (scoped objects): Remove `auto` from Enforcement section (#1979)
The enforcement rule on "an object is allocated and then deallocated on all paths" is not _specifically_ about objects declared by the `auto` keyword, and `auto` does not just mean "automatic storage duration" anymore.
3 years ago
saimen 8181873753
F.21: fix variable name in example and text (#1981) 3 years ago
Sergey Zubkov 65aae3ede6 C.65: clarify pointer move example with comments (issue #1892) 3 years ago
Sergey Zubkov 0b22b82159 Revert "C.65: more explicit about the badness of bad example"
This reverts commit 7ad62600f1.
3 years ago
Sergey Zubkov bafb571ade F.53 add notes about capture of this and non-local pointers
closes #1816
3 years ago
Sergey Zubkov a217a9ff71 F.20 extract unrelated parts into new rule, F.49
closes #1862
3 years ago
Sergey Zubkov 7ad62600f1 C.65: more explicit about the badness of bad example
closes #1892
3 years ago
Herb Sutter b22df66453
Closes #1907 3 years ago
Sergey Zubkov c16373c838 bump date 3 years ago
Sergey Zubkov 5d2c6c9dd2 moved T.140/T.141 to F.10/F.11 leaving redirects behind (closes #1974) 3 years ago
Sergey Zubkov 083bca09d6 move SF.1 to NL.27, leaving a redirect behind (closes #1965) 3 years ago
Sergey Zubkov f25df31132 [F.21] address returning expensive-to-copy tuples (closes #1945) 3 years ago
Sergey Zubkov dfaecb2e75 [R.12] disambiguate identifier in examples (closes #1960) 3 years ago
Xeverous 71e48cf083
NR.4: fix typo (declaration => definition) (#1967) 3 years ago
Andrey Sikorin af048a07b8
Change = to {} for default member initialization (#1973)
* Change = to {} for default member initialization

* Remove nullptr
3 years ago
Sergey Zubkov e1735eaf89 recover link to multimethods paper, closes #1975 3 years ago