Modified sgpem2dman.texi:
-Adjusted some code snippets whose style was inconsistent -Added an item for operator overloading git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@187 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
ef6dd558d2
commit
7248e4026e
|
@ -90,6 +90,11 @@ Free Documentation License''.
|
|||
|
||||
@table @strong
|
||||
|
||||
@item 2006, January 24th, @r{--- Luca Vezzaro}
|
||||
Updated some code snippets whose style were
|
||||
inconsistent with our coding rules. Added the point on
|
||||
operator overloading to the coding conventions.
|
||||
|
||||
@item 2005, December 26th, @r{--- Matteo Settenvini}
|
||||
Changed directory layout for @samp{src}. Added
|
||||
@samp{swe/prototypes} to repository layout.
|
||||
|
@ -309,7 +314,8 @@ Labels go indented on the same level of the
|
|||
containing code block. For example:
|
||||
@example
|
||||
@verbatim
|
||||
switch(x) {
|
||||
switch(x)
|
||||
{
|
||||
case 1:
|
||||
// foo
|
||||
case 2:
|
||||
|
@ -332,7 +338,8 @@ documenting it. For example:
|
|||
class C;
|
||||
// [...]
|
||||
|
||||
class C {
|
||||
class C
|
||||
{
|
||||
public:
|
||||
// [...]
|
||||
};
|
||||
|
@ -546,12 +553,14 @@ containing class. For example:
|
|||
@verbatim
|
||||
class C;
|
||||
|
||||
class C {
|
||||
class C
|
||||
{
|
||||
class D;
|
||||
// ...
|
||||
};
|
||||
|
||||
class C::D {
|
||||
class C::D
|
||||
{
|
||||
// ...
|
||||
};
|
||||
@end verbatim
|
||||
|
@ -559,6 +568,19 @@ class C::D {
|
|||
The order for visibility should be: @code{public}, then
|
||||
@code{protected}, then @code{private}.
|
||||
|
||||
@item
|
||||
Use operator overloading with care, only define
|
||||
overloaded operators if the use of that operator is a
|
||||
natural way to perform a particular operation on the
|
||||
object(s).
|
||||
In case operator overloading is considered the
|
||||
best choice, a lot of operators should still be avoided
|
||||
due to their profound integration with the language,
|
||||
and their tendency to lead to ugly bugs. Some
|
||||
examples of these operators are: the casting operator,
|
||||
@code{operator delete}, @code{operator new},
|
||||
@code{operator ^}.
|
||||
|
||||
@end enumerate
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue