Skip to content

Commit c5a7718

Browse files
Add clarifying example to SF.12
The examples in SF.12 are likely to encourage readers to always use the `""` form of `'#include` when including headers from the same project ([discussion](#1596 (comment))). However, in larger projects this may not always be appropriate; `<>` should be used for includes located via a header search path. This proposed solution adds an example of the later, i.e. where `<>` is used to include a header from the same project.
1 parent bd7085e commit c5a7718

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19306,6 +19306,7 @@ Nevertheless, the guidance is to use the quoted form for including files that ex
1930619306
#include <some_library/common.h> // A file that is not locally relative, included from another library; use the <> form
1930719307
#include "foo.h" // A file locally relative to foo.cpp in the same project, use the "" form
1930819308
#include "foo_utils/utils.h" // A file locally relative to foo.cpp in the same project, use the "" form
19309+
#include <component_b/bar.h> // A file in the same project located via a search path, use the <> form
1930919310

1931019311
##### Note
1931119312

0 commit comments

Comments
 (0)