From edcc78aefcaf11f41ee9830816d342e184155906 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Tue, 26 Oct 2004 15:45:13 +0000 Subject: [PATCH] * Fix spelling and grammar errors * Close

tags properly * Break up paragraphs with blank lines, clean up text alignment * Delete unbalanced " git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17254 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CodingStandards.html | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index 8171130e2a2..51c8f238e14 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -372,16 +372,19 @@ to support it.

Use of class and struct Keywords
-

In C++ the class and struct keywoards can be used almost - interchangeably. The only difference is when they are used to declare a class: - class makes all members private by default while struct - makes all members public by defaut.

-

Unfortunately, not all compilers follow the rules and some will generate - different symbols based on whether class or struct was used - to declare the symbol. This can lead to problems at link time.

-

So, the rule for LLVM is this: "always use the class keyword, - unless all members are public in which case struct is - allowed.

+ +

In C++, the class and struct keywords can be used almost +interchangeably. The only difference is when they are used to declare a class: +class makes all members private by default while struct makes +all members public by default.

+ +

Unfortunately, not all compilers follow the rules and some will generate +different symbols based on whether class or struct was used to +declare the symbol. This can lead to problems at link time.

+ +

So, the rule for LLVM is to always use the class keyword, unless +all members are public, in which case struct is allowed.

+