C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 23 Sep 2024 16:15:57 +0300
On Mon, 23 Sept 2024 at 15:02, Jiri Bobek <jiri.bobek_at_[hidden]> wrote:
>
> One has to wonder how C++ survived 40 years given that:
> - you cannot include the same file twice
> - deciding if it's the same file is impossible

By using a sufficiently unique identifier in the file contents, one
that doesn't mean "the full contents of the file,
and hash thereof". Also known as an "include guard".

Received on 2024-09-23 13:16:15