Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what about replacing #ifndex/#define/#endif constructs with #pragma once? #34

Closed
slayoo opened this issue Jan 31, 2017 · 5 comments
Closed

Comments

@slayoo
Copy link
Collaborator

slayoo commented Jan 31, 2017

No description provided.

@tvatter
Copy link
Collaborator

tvatter commented Jan 31, 2017

Why?

If I understand correctly, it is not part of the standard and should not be used if portability is a concern. Furthermore, since the project is rather small, the benefits of using it are limited.

Note that I didn't know much about it and my sources are:

@slayoo
Copy link
Collaborator Author

slayoo commented Feb 1, 2017

  • less bug prone (forgotten define name change after using a copy of an old file as a skeleton or after simply renaming a file)
  • less code
  • all compilers that we might target support it
    (but it's of course purely your decision - just wanted to confirm if we go one or the other way)

@tvatter
Copy link
Collaborator

tvatter commented Feb 1, 2017

OK, that's the three advantages that I had understood ;)

I don't like the "non-standard" thing, but I have no strong opinion on this.

Thomas?

@tnagler
Copy link
Collaborator

tnagler commented Feb 1, 2017

I don't have any opinion on this. The #ifndef is certainly more common, at least I've seen this way more often. But if #pragma once is the more safe and modern version, we can go with that too.

@tvatter tvatter mentioned this issue Mar 10, 2017
19 tasks
@tnagler
Copy link
Collaborator

tnagler commented Mar 14, 2017

was addressed by 1727fb1

@tnagler tnagler closed this as completed Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants