3 ms·
> Also consider the use of #pragma once - though as far as I can tell, this (still) isn't ISO, so I've decided to avoid it. Depends on your target platform. G
by JoshTriplett 11y ago
> Also consider the use of #pragma once - though as far as I can tell, this (still) isn't ISO, so I've decided to avoid it.
Depends on your target platform. GCC, clang/LLVM, Visual C++, and many proprietary compilers all support it. What platform are you targeting that doesn't support it?
Because if you're writing any non-trivial useful code, it's highly likely that your code is not pure ISO C; you're using some library with support for various platforms, or a system call interface, or some other interface to a real system. Once you do that, universal portability no longer applies, so you might as well think about which specific target platforms you care about.
- to3m 11y agoGood question - probably the main reason (and you don't have to agree that it's a good one) is that I'd never have to think about it again ;)