Added example for SF.21 (#1890)

* Example for SF.21

* Update isocpp.dic

* remove space

* revert isocpp.dic change
This commit is contained in:
bgloyer
2022-04-07 13:20:49 -07:00
committed by GitHub
parent d9d985a9f6
commit 0db2b88c57

View File

@@ -19558,7 +19558,26 @@ It is almost always a bug to mention an unnamed namespace in a header file.
##### Example ##### 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 ##### Enforcement