Lines Matching full:when
59 file actually uses directly. (Exception: when foo.cpp starts, as it should,
73 can and should look like their models when the reader can safely assume that
89 especially when you can declare them directly in a `for()`/`while()`/`if()`
91 when creating names.
95 1. When `//` follows code on a line, precede it with two spaces.
111 1. Don't indent the bodies of namespaces, even when nested.
119 with braces, even when the body is a single statement or empty. Note that this
130 When testing for an error case that should cause an early return, do so with
161 When `int` just obviously works, just use `int`. When you need something
165 project when names don't conflict or better solutions exist. Never use
170 1. Use `auto` judiciously. When the type of a local variable is known,
179 1. When defining argument types, use values when object semantics are
185 when they can't be function results.
191 1. When a `switch()` statement's labels do not cover all possible case values
195 1. On the other hand, when a `switch()` statement really does cover all of
198 clang to ensure that no warning is emitted when the cases are indeed all covered.
199 1. When using `std::optional` values, avoid unprotected access to their content.
201 This is implicit when they are function results assigned to local variables
203 When no presence test is obviously protecting a `*x` reference to the
206 1. We use `c_str()` rather than `data()` when converting a `std::string`
207 to a `const char *` when the result is expected to be NUL-terminated.
211 conversions to `bool` when initializing `bool` variables and arguments,
224 1. When copy constructors and copy assignment are not necessary,
226 will be implicitly deleted. When neither copy nor move constructors
237 undefined when uninitialized, shallowly copyable, reassignable, and often
247 Take care when initializing a reference with another reference to ensure
270 Can be wrapped in `std::optional<>` when nullability is required.
275 Safe to use *only* when the data are private to just one
277 Used sparingly in place of `std::shared_ptr<>` only when the overhead
297 produce source code when macros and templates suffice; don't write macros
298 when templates suffice. Templates are statically typed, checked by the