Allow for header protection using defined operator#550
Allow for header protection using defined operator#550MFelida wants to merge 2 commits into42school:masterfrom
Conversation
|
Hello, @MFelida! I don't think this is a good idea. Using // Just added parenthesis
#if !defined(file_h)
#define file_h
// ...
#endif
// Omit `!` and use `==` instead
#if defined(file_h) == 0
#define file_h
// ...
#endif
// What about a lot of `!`?
#if !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! defined file_h
#define file_h
// ...
#endifTo be honest, |
|
Thanks for your input @NiumXp.
Personally, I don't think any of that matters. Using Preferably the norm would be amended to only allow Thanks for pointing out the potential errors. I'll see what I can do about those. |
Issues Fixed
fixes #544
Verification Steps
poetry run flake8to check for linting issues.poetry run pytestto ensure unit tests pass.poetry run toxto validate compatibility across Python versions.jkAdditional Notes
The norm doesn't specifically mandate the use if
#ifndeffor header protections, so I think using#if !definedshould be allowed