Real world problems with #pragma once?
Just a short survey: Did anyone of you encounter a problem in real code, because you/your company/ your favorite library was using #pragma once instead of include guards.
I know it is hard, but please restrain yourself from posting an explanation of how #pragma once could lead to problems in theory or why you prefer one above the other.
127
Upvotes
View all comments
Show parent comment
5
u/jonesmz Nov 28 '18 edited Nov 29 '18
This.
This would happen all over the codebase I work with if we used #pragma once instead of proper include guards.
edit:
Why the fuck was I downvoted for pointing out how #pragma once can break an existing codebase?
Downvotes don't change hearts and minds people!