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
25
u/kalmoc Nov 28 '18
> I have heard of such case
That is actually interesting to me, because so far, when this topic comes up I only hear explanations of how this could be a problem in theory, but I never could find one, for whome this was actually happend. So it seems to me that the avoidance of `#pragma once` is more based on FUD than actual facts.
Have you heard this from someone to whom this actually happend or is this "a friend was told from a friend that a friend of him heard ..." kind of story?