au
au copied to clipboard
Switch from `#pragma once` to include guards
This would be a more robust solution. #pragma once is fine for first-party code in a project, but for third party users, there will always be edge cases.
@geoffviola mentions that there may be length restrictions (32 characters?), so we should look into that before we take the leap.
(On some older compilers)
C++ doesn't specify a limit on macro identifier length. C99 and later specifies it as the first 63 characters.
Even though there is no specific limit on the length of identifiers, early compilers had limits on the number of significant initial characters in identifiers and the linkers imposed stricter limits on the names with external linkage.
https://en.cppreference.com/w/c/language/identifier#:~:text=Even%20though%20there%20is%20no,the%20names%20with%20external%20linkage.