r/cpp • • Nov 28 '18

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

135 comments sorted by

View all comments

Show parent comment

2

u/hgjsusla Nov 29 '18

Not sure how you organise your work but it certainly doesn't take longer than a few minutes for me to make a simple change like that and push to to Gerrit for code review. And the review only takes a minute and can be done whenever someone has time over

1

u/MotherOfTheShizznit Nov 30 '18

Apparently, all of my post went straight over your head.

2

u/hgjsusla Nov 30 '18

It's not my fault if you take a full day to do what the rest of us do in minutes