Manage header include guards

Manage header include guards in C++ — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need the header to be safe to include multiple times in large builds. Add an include guard to…
I need the header to be safe to include multiple times in large builds. Add an include guard to game_engine/math/vec3.h so the file can be included from renderer, physics and tools without accidental redefinition. Use the project convention of uppercase path-based macro names and place the guard around everything in the file; leave the existing content unchanged otherwise.

Improve — make it easier to accept

+
Before I commit vec3.h to the repo, make approving it trivial for reviewers. Put the include guard…
Before I commit vec3.h to the repo, make approving it trivial for reviewers. Put the include guard macro name at the top so reviewers can scan it, keep the guard consistent with other headers (GAME_ENGINE_MATH_VEC3_H), and ensure there is exactly one trailing newline. Flag any existing #pragma once and explain why we prefer the macro style here.

Decide — diagnose the stuck moment

+
I just got multiple-definition link errors when combining renderer and physics, both include…

Build fails with multiple-definition errors for Vec3

I just got multiple-definition link errors when combining renderer and physics, both include game_engine/math/vec3.h. I think the header lacks a proper include guard or has inconsistent macros. I cannot check every include path and I worry changing the header could break generated code. What's the most likely cause and the safest fix to restore a clean build now?

Become — change the pattern

+
Across several projects we keep getting duplicate-definition or redefinition errors after…

Headers occasionally cause duplicate-definition link errors across modules

Across several projects we keep getting duplicate-definition or redefinition errors after refactors. We patch headers ad hoc with different guard styles and rely on developers remembering to add guards. What one habit or small rule change will stop these recurring rebuild-and-fix cycles and make code reviews catch the problem earlier?

Next to this one

Other programming language work people do in C++.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.