]> git.lyx.org Git - lyx.git/blobdiff - development/Code_rules/Recommendations
allow one past-the-end position in CursorSlice, as it eases iteration
[lyx.git] / development / Code_rules / Recommendations
index ae1ef292e99826a73371604ffb0dc2246fcc0823..4680beafa767fdc4c5f03ab620fcda55c3b7d5c9 100644 (file)
@@ -1,6 +1,6 @@
-These are some rules for effective C++ programming. These are taken from 
-Scott Meyers, and are presented in their short form. These are not all the 
-rules Meyers presents, only the most important of them. LyX does not yet 
+These are some rules for effective C++ programming. These are taken from
+Scott Meyers, and are presented in their short form. These are not all the
+rules Meyers presents, only the most important of them. LyX does not yet
 follow these rules, but they should be the goal.
 
 - Use const and inline instead of #define
 follow these rules, but they should be the goal.
 
 - Use const and inline instead of #define
@@ -14,7 +14,7 @@ follow these rules, but they should be the goal.
   operator for all classes with dynamically allocated memory that
   do not inherit noncopyable
 
   operator for all classes with dynamically allocated memory that
   do not inherit noncopyable
 
-- make destructors virtual in base classes.
+- make destructors virtual in base classes and only there.
 
 - assign to all data members in operator=.
 
 
 - assign to all data members in operator=.
 
@@ -54,13 +54,18 @@ follow these rules, but they should be the goal.
 
 --------
 
 
 --------
 
-S. Meyers. Effective C++, 50 Specific Ways to Improve Your Programs and 
+S. Meyers. Effective C++, 50 Specific Ways to Improve Your Programs and
 Design. Addison-Wesley, 1992
 
 ==================================
 
 Design. Addison-Wesley, 1992
 
 ==================================
 
-And one of mine: (Lgb)
+And one of mine: (Lgb)
 
 - When swiching on enums, refrain from using "default:" if possible.
 
 
 
 - When swiching on enums, refrain from using "default:" if possible.
 
 
+And one of mine: (Andre')
+
+- try to implement your class in a way that the automatically generated
+  copy constructor and copy assignment work out-of-the box.
+