diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 14f490f..7b02c0d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -19558,7 +19558,26 @@ It is almost always a bug to mention an unnamed namespace in a header file. ##### Example - ??? + // file foo.h: + namespace + { + const double x = 1.234; // bad + + double foo(double y) // bad + { + return y + x; + } + } + + namespace Foo + { + inline constexpr double x = 1.234; // good + + inline double foo(double y) // good + { + return y + x; + } + } ##### Enforcement