3 ms·
There are proprietary compilers for embedded chipsets that don't support this feature. Granted, these are fewer and further between than they once were, but th
by nanolith 10y ago
There are proprietary compilers for embedded chipsets that don't support this feature. Granted, these are fewer and further between than they once were, but they are out there. It really depends on how portable you want your code to be. Even though it is widely supported, it still isn't a standard language feature.
If your goal is to have a library that runs on most Unix-like and Windows systems, then '#pragma once' works just fine. But, if there's a possibility that your code would be deployed to an odd platform, it's probably best to use traditional header guards. I'm so used to using header guards that the appeal of '#pragma once' isn't that great for me.
- apaprocki 10y agoYou don't have to go that far.. Oracle Studio (nee Sun Studio) for Solaris doesn't support it.