Skip to content

Commit 67b374c

Browse files
authored
Merge pull request ceph#60331 from MaxKellermann/CodingStyle_fwd
CodingStyle: allow C++ forward declarations Reviewed-by: Greg Farnum <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]>
2 parents fcc9ffd + 67f884d commit 67b374c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CodingStyle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ by section.
108108
portability since `#pragma once` is widely supported and is known
109109
to work on GCC and Clang.
110110

111+
* Header Files -> Forward declarations:
112+
113+
Forward declarations of structs, unions, classes and enums can be
114+
used to reduce header dependencies. This speeds up compile times
115+
because the compiler has to process less code.
116+
111117

112118
The following guidelines have not been followed in the legacy code,
113119
but are worth mentioning and should be followed strictly for new code:

0 commit comments

Comments
 (0)