mirror of
https://github.com/cpp-best-practices/cppbestpractices.git
synced 2025-12-17 11:14:35 +03:00
Added "#pragma once" idea to include guards guideline.
This commit is contained in:
@@ -113,6 +113,9 @@ class MyClass {
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You may also consider to use the `#pragma once` directive instead which is quasi standard across many compilers.
|
||||||
|
It's short and makes the intent clear.
|
||||||
|
|
||||||
|
|
||||||
## {} are required for blocks.
|
## {} are required for blocks.
|
||||||
Leaving them off can lead to semantic errors in the code.
|
Leaving them off can lead to semantic errors in the code.
|
||||||
|
|||||||
Reference in New Issue
Block a user