C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Mon, 23 Sep 2024 14:52:24 +0200
It works (only) the following way #pragma once // This is a LIBRARY_XYZ_HEADER_H unique identifier, please change, if you reuse in another library #include "utils.h" Now the hash is unique. And it does *not* need include guards. It just needs a unique comment ;-) With it we combine the disadvantages of include guards and #pragma once (but save 1 line)

Received on 2024-09-23 12:52:26