[go: up one dir, main page]

Header guards

Created by: szymonk211

In general, there is small chance anyone would want to create header file without header guards or pragma once, so why not generate it anytime new .h or .hpp file is created? I did something like that on my fork: https://github.com/szymonk211/jucipp/commit/cecd283c1259974ec33a6dd325ae548a62abc0f1 because I needed it for some project that uses header guards.

My solution might be a bit incomplete though. In this solution header stubs are generated according to the global policy. Header policy from current project is not taken into account. There is a risk that user can by accident mix header guards with pragmas because of that. If user had two projects: one with pragmas and one with guards, he would have to change the global settings any time he starts working on another project.

This is partially related to #294 (closed).