explicitly note that "file" refers to as it exists in the location of it being authored/modified.
this is to address any confusion about #including "bar.h" from foo.h based on whether bar.h is relative to foo.h at the time and location foo.h is being modified (e.g. under mylib/foo.h) versus at the time/location from which foo.h is installed to the system and included by the user (e.g. from /usr/include).
Part of SL.str.1 references replacing “const string*” with “string_view”, but the example code above shows “const string&” instead.
This changes the comment to the reference rather than pointer.
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.
* 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>
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.
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.
The current guidance on SF.12 can be over-applied and devolves into "always use <>" because all compilers support adding include directories to the <> search. In this case, even the current directory may be added and so it is always possible to use <> for every header. Applying the guidance then devolves into an undesirable state where <> is always used and include"" is never used.
Instead, the proposed guidance leverages and encourages the distinction between <> and "" to create an easy-to-understand rule that the original guidance hints at and that most developers already follow and understand: "" is for local headers and <> is for library and external headers.
* 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>
* 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
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)