Are 'const' variables precomputed by default in C++?
- by Gunnar
Suppose I have variables for positions like
const float latitude = 51.+11./60.+33.0461/3600.;
const float longitude = 12.+50./60.+31.9369/3600.;
and use them frequently in the program. Does the compiler precompute that?
(This example should not produce much overhead, but you get the point.)
Bonus point for pointing out location. ;)
TIA