5 ms·
pragma once is supported by enough compilers to be considered a standard by now :)
by mrich 10y ago
pragma once is supported by enough compilers to be considered a standard by now :)
- PeCaN 10y agoThe annoying thing is that in spite of the fact that everyone (including the bizarrely malcompliant and bug-ridden bcc32 compiler I use at work) supports #pragma once, it will never get standardized simply because pragma anything is supposed to be strictly implementation-defined.
- slavik81 10y agoI built guardonce[1] to help mitigate complaints that #pragma once was non-standard. If you can easily convert back to include guards, you can worry less about what compilers you might support in the future and just consider the compilers you support right now. [1]: https://github.com/cgmb/guardonce https://github.com/cgmb/guardonce
- gpderetta 10y agoFWIW we had our build system broken on MSVC because of pragma once. IIRC it was an issue with symlink.