Closed arneboe closed 8 years ago
Hey guys,
should we switch from using #ifdef include guards to using "#pragma once"?
and less error prone (as you don't have to manually change the include guard when renaming files). For some compilers it improves performance (although not for gcc and clang as they have ifdef guard optimizations).
Anyway, it is fine to me, I am not particularly against it. +1
+1
Hey guys,
should we switch from using #ifdef include guards to using "#pragma once"?
pragma once is widely supported (https://en.wikipedia.org/wiki/Pragma_once#Portability)
and less error prone (as you don't have to manually change the include guard when renaming files). For some compilers it improves performance (although not for gcc and clang as they have ifdef guard optimizations).