does anyone actually use header guards anymore in personal c++ projects lol

@deadbeef Only to prevent errors about duplication of entities at either compile or link time.

@rmerriam " once" directive seems to be supported by most compilers nowadays. I've never had to use manual include guards, though again, none of the projects I've worked on are really that big.

@deadbeef

I consider both techniques to be guards. Generally, I use the pragma.

Follow

@rmerriam True, although by "header/include guard" I meant the "old style" using , , etc. And yeah, pragma is definitely more convenient.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.