+
+<P><LI><A NAME="no_newlogicalops"></A><B>Don't use new logical operators keywords</B></LI><P>
+The C++ standard has introduced the following new reserved words: <tt>or</tt>,
+<tt>and</tt>, <tt>not</tt>, <tt>xor</tt>, <tt>bitand</tt>, <tt>bitor</tt>,
+<tt>compl</tt>, <tt>and_eq</tt>, <tt>or_eq</tt>, <tt>not_eq</tt>,
+<tt>or_eq</tt> which can be used instead of the usual C operations &&,
+||, ~ etc.
+<P>This wonderful (and not backwards compatible in addition to being
+absolutely useless) new feature means that these new keywords should not be
+used as the variable names - even if current compilers usually will accept
+this, your code will break in the future. For most of the keywords, using them
+as variable names is quite unlikely, but <tt>or</tt> and <tt>compl</tt> were
+used in the wxWindows sources which seems to indicate that they are the most
+likely candidates.
+<P>It goes without saying that these new keywords should not be used instead
+of the tradional C operators neither both because most compilers don't accept
+them and because using them in C code makes it less readable.
+</OL>
+
+ <BR>
+ <LI>Other compiler limitations</LI><P>
+This section lists the less obvious limitations of the current C++ compilers
+which are less restrictive than the ones mentioned in the previous section but
+are may be even more dangerous as a program which compiles perfectly well on
+some platform and seems to use only standard C++ featurs may still fail to
+compile on another platform and/or with another compiler.
+
+<OL>
+ <P><LI><A NAME="no_ternarywithobjects"></A><B>Use ternary operator ?: carefully</B></LI><P>
+ The ternary operator <TT>?:</TT> shouldn't be used with objects (i.e. if any
+of its operands are objects) because some compilers (notably Borland C++) fail
+to compile such code.
+<P><U>Workaround</U>: use <TT>if/else</TT> instead.
+<PRE>
+ wxString s1, s2;
+
+ // Borland C++ won't compile the line below
+ wxString s = s1.Len() < s2.Len() ? s1 : s2;
+
+ // but any C++ compiler will compile this
+ wxString s;
+ if ( s1.Len() < s2.Len() )
+ s = s1;
+ else
+ s = s2;
+</PRE>
+
+ <P><LI><A NAME="no_autoaggregate"></A><B>Don't use initializers with automatic arrays</B></LI><P>
+The initializers for automatic array variables are not supported by some older
+compilers. For example, the following line
+<PRE>
+ int daysInMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+</PRE>
+will fail to compile with HP-UX C++ compiler.
+<P><U>Workaround</U>: either make the array static or initialize each item
+separately: in the (stupid) example above, the array should be definitely
+declared as <TT>static const</TT> (assuming that the leap years are dealt with
+elsewhere somehow...) which is ok. When an array is really not const, you
+should initialize each element separately.
+
+ <P><LI><A NAME="no_dtorswithoutctor"></A><B>Always have at least one constructor in a class with destructor</B></LI><P>
+It is a good rule to follow in general, but some compilers (HP-UX) enforce it.
+So even if you are sure that the default constructor for your class is ok but
+it has a destructor, remember to add an empty default constructor to it.