Skip to content
Snippets Groups Projects
Commit a06b75ba authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm obsolete STYLE

parent 81199cbe
No related branches found
No related tags found
No related merge requests found
== checks ==
mylint.py --counting=detailed `lssrc` > ~/h
== include's ==
- Block 1: Standard software
- C standard library: cstdlib cstdio cstring cmath *.h sys/*.h
- C++ standard library: iostream fstream string vector map algorithm
- boost
- GSL
- Block 2: Our own libs
- trivia readplus yamlfreeze lmfit kww
- Block 3: Current project
== function arguments and "const" qualifier ==
- never use "const" with simple data types
double f( double x ); // and not ( const double x )
- prefer passing complex data types (including string) by reference:
double sum( const vector<int>& row );
- generally, when passing arguments by & reference: not putting "const"
means that mutation of the argument is intended
- omitting "const" has the side effect, that the function cannot be
called with a constructor in place of the argument:
out = sum( vector<int>(7) ); // only allowed when arg is declared const
- "const" with pointer arguments is poorly understood (even less so with
shared_ptr)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment