diff options
Diffstat (limited to 'src/CODESTYLE')
-rw-r--r-- | src/CODESTYLE | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/CODESTYLE b/src/CODESTYLE index ed92163..56be3ea 100644 --- a/src/CODESTYLE +++ b/src/CODESTYLE @@ -1,6 +1,6 @@ AHFinderDirect Code Style ========================= -$Header: /usr/local/svn/cvs-repositories/numrelcvs/AEIThorns/AHFinderDirect/src/CODESTYLE,v 1.1 2003-03-22 18:56:49 jthorn Exp $ +$Header: /usr/local/svn/cvs-repositories/numrelcvs/AEIThorns/AHFinderDirect/src/CODESTYLE,v 1.2 2003-05-06 15:43:54 jthorn Exp $ This file documents some general programming conventions used in this thorn. @@ -17,6 +17,13 @@ so I've written my own (src/mpp). *.minc Maple headers to be @included by my Maple preprocessor *.mm Maple code (output from my Maple preprocessr) +None of my header files ever #includes another file, so in theory there's +no problem with multiple inclusion. However, see "C++ Templates" below +for some ugly compiler problems with this... + + +Configuration +============= Only a few options are configured at compile-time; these use #defines in src/include/config.h. @@ -143,6 +150,28 @@ boost::array, and my jtutil::array[1234]d<> classes should be converted to boost::multi_array. +C++ Templates +============= + +I use C++ templates, but not for anything fancy, just simple containers. +I instantiate all templates explicitly. + +Some C++ compilers offer "automatic" template instantiation. In practice +this often causes compilation to fail when the compiler can't find .cc +files in other directories. So, I highly recommend turning *off* all +automatic template instantiation "features". + +When using the DEC/Compaq/HP/whatever-their-corporate-name-is-this-week +C++ compiler (version 6.3.6.8) under Alpha Linux, even with automatic +template instiation disabled, the compiler *still* seems to include some +header files multiple times. To avoid duplicate-definition errors caused +by this, I have protected all the header files in the subdirectories + include/ + jtutil/ + elliptic/ +against multiple inclusion with the standard #ifndef trick. + + Miscellaneous ============= |