mockingbirdnest / Principia

𝑛-Body and Extended Body Gravitation for Kerbal Space Program
MIT License
771 stars 70 forks source link

Exported template parameters of classes and structs should be postfixed with an underscore #572

Open eggrobin opened 9 years ago

eggrobin commented 9 years ago

Considering that template parameters of a class or struct cannot be accessed outside of it, that accessors for template parameters are therefore useful, that these accessors cannot bear the same name as the template parameters (14.6.1, paragraph 6),

considering that a similar issue exists with private member variables, that we resolve it (following the Google C++ styleguide) by appending an underscore to the name of such variables,

considering that the other reasonable alternative, CamelCase prefixed by the letter k, used for compile-time constants of global or class scope, would hamper readability,

considering that underscores postfixing every template parameter would further impede readability of already abstruse template metaprogramming,

for these reasons,

the following naming convention shall be implemented for template parameters:

pleroy commented 4 years ago

Also, let's use typename, not class, for the template template parameters.