We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9d985a commit 0db2b88Copy full SHA for 0db2b88
CppCoreGuidelines.md
@@ -19558,7 +19558,26 @@ It is almost always a bug to mention an unnamed namespace in a header file.
19558
19559
##### Example
19560
19561
- ???
+ // file foo.h:
19562
+ namespace
19563
+ {
19564
+ const double x = 1.234; // bad
19565
+
19566
+ double foo(double y) // bad
19567
19568
+ return y + x;
19569
+ }
19570
19571
19572
+ namespace Foo
19573
19574
+ inline constexpr double x = 1.234; // good
19575
19576
+ inline double foo(double y) // good
19577
19578
19579
19580
19581
19582
##### Enforcement
19583
0 commit comments