I generally don't bother with #pragma once
as my code sometimes does have to compile with something other than MSVC or GCC (compilers for embedded systems don't always have the #pragma).
So I have to use #include guards anyway. I could also use #pragma once
as some answers suggest, but there doesn't seem to be much reason and it will often cause needless warnings on the compilers that don't support it.
I'm not sure what time savings the pragma might bring. I've heard that compilers generally already recognize when a header has nothing but comments outside of the guard macros and will do the #pragma once
equivalent in that case (ie., never processing the file again). But I'm not sure if it's true or just a case of compilers could do this optimization.
In either case, it's just easier for me to use #include guards which will work everywhere and not worry about it further.