Open fedepedron opened 7 years ago
¿Perhaps implementing the #ifndef / #define / #endif guard inside headers?
(3) Families of subroutines inside namespaces, classes are for objects. Source
(4) When classes are inside a namespace, the definition of is methods is as shown in this link. It seems to usually be a good a idea to put classes inside namespaces (source). Also check: anonymous namespaces.
(5) Resolve issue of where to define templates (.h or .cpp) and where to specialize them (see first answer)
(6) First write #includes< banana >, then #includes "localbanana". And sort them alphabetically.
(I'm @ramirezfranciscof )
Things to add to the guide on how to program in C/CPP/CUDA
(1) Add headers in the .cpp files when possible, in the .h when there is no choice (ex: when declaring types that are defined in another .h). source
(2) Includes always outside of namespaces.
To be continued...