TLDR: I am willing to change all the Macro include guards to #pragma once
, and would like feedback on if this would be a welcomed change or not.
Preface:
I want to preface by saying I know that this is not a necessary change and also that it is more of a preference anyway. I am just here to help however I can, so I am happy to leave as is if that’s preferred.
Discussion:
I couldn’t find a discussion about this, so I wanted to bring it up to get feedback on the idea. I am aware that #pragma once
is not officially in the c++ standard, however, all the major compilers support it. I think it makes the intent clear and far easier to read, but I also understand that the project may wish to strictly conform to the standard hence the post here.
How I came across:
I am working on a branch on my fork of avogadrolibs that cleans up code and makes a lot of simple changes for readability, including:
#typedef
tousing
(where appropriate)- proper default constructor and destructor declarations
- unused include removal
- missed pointer/ref type declarations on
auto
statements - concatenated namespaces
- clear typecasting errors
- etc
I would be happy to tack the #pragma once
change on as well with these.