Seriously, use both.
At first I thought you meant to fix your usage of them (use #pragma once here, use guards there, etc.) which would be absolutely the worst thing to do. Consistency is the best policy.
But you were actually talking about using them both in every single file.
I don’t like this. There is literally no reason to use both in the same file, and it would in fact confuse a lot of people looking at your code.
Firstly, thinking about the headers being a safety net is false hope. You will likely be working on a platform that supports #pragma once (which is why you consider header guards to be fallbacks) which means that the integrity of the header guards has never been tested.
Everyone bumps into that problem with header guards where they reuse the same macros for different headers and you will too. The only difference is that we encounter that on at most 1 file at a time and then quickly realize our error and fix it. If you suddenly have to “fall back” on all of your header guards at once you will suddenly have tons of errors and lots of places that might be tricky to find.
For me, portability is really a concern since I want my engine to go public and I may end up supporting consoles later. So I prefer header guards.
And I, like everyone, have bumped into the problem in which the same macro was used in different files.
my solution however was not to just change over to #pragma once, but to make a tool that not only solves this problem but caters to my desire for consistency.
When I make a new file, I don’t copy-and-paste from an existing file. I hit Ctrl-1 and my script prompts me with a class name, a header guard name, and then makes the shell of a new class, including header guards, for me. It keeps my copyright notice consistent, gives me consistent spacing between the copyright notice, the header guards, the includes, the namespace, and the class declaration, and it ensures I never have this problem with multiply-used header guards.
Another tactic I employed is to include the namespace in the header guard, which has saved me from possible headache in the past.
L. Spiro