C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Wed, 25 Sep 2024 09:01:47 +0100
Thiago wrote:
>
> Any modification of existing practice is also a no-go. That's also why #once
> (instead of #pragma once) has not gained traction.
>
> If you have to create an identifier, you may as well use include guards, which
> do require such an identifier.


So it looks like in future I might just do:

    #ifndef INCLUSION_GUARD_464684684979817943466986579767572
    #define INCLUSION_GUARD_464684684979817943466986579767572
    . . .
    #endif // INCLUSION_GUARD

Received on 2024-09-25 08:02:00