mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
travis CI fixes
This commit is contained in:
@@ -2909,7 +2909,8 @@ For example:
|
||||
|
||||
Distance d1 = measure(obj1); // access d1.value and d1.unit
|
||||
auto d2 = measure(obj2); // access d2.value and d2.unit
|
||||
auto [value, unit] = measure(obj3); // access value and unit; somewhat redundant to people who know measure()
|
||||
auto [value, unit] = measure(obj3); // access value and unit; somewhat redundant
|
||||
// to people who know measure()
|
||||
auto [x, y] = measure(obj4); // don't; it's likely to be confusing
|
||||
|
||||
The overly-generic `pair` and `tuple` should be used only when the value returned represents to independent entities rather than an abstraction.
|
||||
@@ -6567,7 +6568,7 @@ Note that we can put default initializers on member variables: [C.49: Prefer ini
|
||||
|
||||
##### Note
|
||||
|
||||
The key to this rule is whether the semantics of the getter/setter are trivial. While it is not a complete definition of "trivial", consider whether there would be any difference beyond syntax if the getter/setter was a public data member instead. Examples of non-trival semantics would be: maintaining a class invariant or converting between an internal type and an interface type.
|
||||
The key to this rule is whether the semantics of the getter/setter are trivial. While it is not a complete definition of "trivial", consider whether there would be any difference beyond syntax if the getter/setter was a public data member instead. Examples of non-trivial semantics would be: maintaining a class invariant or converting between an internal type and an interface type.
|
||||
|
||||
##### Enforcement
|
||||
|
||||
@@ -8964,7 +8965,7 @@ Statement rules:
|
||||
* [ES.74: Prefer to declare a loop variable in the initializer part of a `for`-statement](#Res-for-init)
|
||||
* [ES.75: Avoid `do`-statements](#Res-do)
|
||||
* [ES.76: Avoid `goto`](#Res-goto)
|
||||
* [ES.77: Minimize the use of 'break' and `continue` in loops](#Res-continue)
|
||||
* [ES.77: Minimize the use of `break` and `continue` in loops](#Res-continue)
|
||||
* [ES.78: Always end a non-empty `case` with a `break`](#Res-break)
|
||||
* [ES.79: Use `default` to handle common cases (only)](#Res-default)
|
||||
* [ES.84: Don't (try to) declare a local variable with no name](#Res-noname)
|
||||
@@ -10255,7 +10256,7 @@ Readability.
|
||||
// ...
|
||||
}
|
||||
|
||||
The "event loop" is misleading because the `events` counter has nothing to do with the loop cindition (`wait_for_1vent()`).
|
||||
The "event loop" is misleading because the `events` counter has nothing to do with the loop condition (`wait_for_event()`).
|
||||
Better
|
||||
|
||||
int events = 0;
|
||||
@@ -10370,7 +10371,7 @@ consider `gsl::finally()` as a cleaner and more reliable alternative to `goto ex
|
||||
|
||||
* Flag `goto`. Better still flag all `goto`s that do not jump from a nested loop to the statement immediately after a nest of loops.
|
||||
|
||||
### <a name="Res-continue"></a>ES.77: Minimize the use of 'break' and `continue` in loops
|
||||
### <a name="Res-continue"></a>ES.77: Minimize the use of `break` and `continue` in loops
|
||||
|
||||
##### Reason
|
||||
|
||||
@@ -10548,7 +10549,7 @@ This may yield too many false positives in some code bases; if so, flag only `sw
|
||||
|
||||
There is no such thing.
|
||||
What looks to a human like a variable without a name is to the compiler a statement consisting of a temporary that immediately goes out of scope.
|
||||
To avoid unpleasent surprises.
|
||||
To avoid unpleasant surprises.
|
||||
|
||||
###### Example, bad
|
||||
|
||||
@@ -16841,7 +16842,7 @@ The argument-type error for `bar` cannot be caught until link time because of th
|
||||
|
||||
// ...
|
||||
|
||||
Here (obviously), the standard library is used pervasively and apparantly no other library is used, so requiring `std::` everywhere
|
||||
Here (obviously), the standard library is used pervasively and apparently no other library is used, so requiring `std::` everywhere
|
||||
could be distracting.
|
||||
|
||||
##### Example
|
||||
|
||||
@@ -111,6 +111,7 @@ czstring
|
||||
d1
|
||||
D1
|
||||
d1's
|
||||
d2
|
||||
D2
|
||||
d2's
|
||||
dag
|
||||
@@ -304,6 +305,7 @@ newdelete
|
||||
nh
|
||||
NL
|
||||
noexcept
|
||||
noname
|
||||
nondependent
|
||||
nonexported
|
||||
nongeneric
|
||||
|
||||
Reference in New Issue
Block a user