anderkve / FYS3150

https://anderkve.github.io/FYS3150
26 stars 14 forks source link

const and constexpr #49

Closed Madssb closed 1 year ago

Madssb commented 2 years ago

Hi, Is it good practice to use const and/or constexpr everywhere i physically can? (for variables that will never be redefined of course)

Is there such a thing as excessive use of const/constexpr?

anderkve commented 2 years ago

Hi @Madssb!

I'm sure there's a wide range of views on this among C++ experts, but here are my two cents: