diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index 2c7eeead79e..a9b3698ae4d 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -526,7 +526,6 @@ library. There are two problems with this:

example) is allowed normally, it is just <iostream> that is causing problems.

-
@@ -571,17 +570,22 @@ DEBUG(dump(DOUT)); - + + +
void print(std::ostream &Out);
 // ...
 print(std::cerr);
void print(llvm::OStream Out);1
-// ...
-print(llvm::cerr);
+
void print(llvm::OStream Out);1
+// ...
+print(llvm::cerr);
+
- -
+

Notes:

-
-

1llvm::OStream is a light-weight class so it should never -be passed by reference. This is important because in some configurations, -DOUT is an rvalue.

+
+
    +
  1. llvm::OStream is a light-weight class so it + should never be passed by reference. This is important because in some + configurations, DOUT is an rvalue.
  2. +
@@ -675,8 +679,8 @@ namespace with an "std::" prefix, rather than rely on "using namespace std;".

In header files, adding a 'using namespace XXX' directive pollutes -the namespace of any source file that includes the header. This is clearly a -bad thing.

+the namespace of any source file that #includes the header. This is +clearly a bad thing.

In implementation files (e.g. .cpp files), the rule is more of a stylistic rule, but is still important. Basically, using explicit namespace prefixes @@ -710,9 +714,9 @@ others.

If a class is defined in a header file and has a v-table (either it has virtual methods or it derives from classes with virtual methods), it must always have at least one out-of-line virtual method in the class. Without -this, the compiler will copy the vtable and RTTI into every .o file that -#includes the header, bloating .o file sizes and increasing link times. -

+this, the compiler will copy the vtable and RTTI into every .o file +that #includes the header, bloating .o file sizes and +increasing link times.