C++ Logo

SG10

Advanced search

Subject: Re: [SG10] __has_include
From: Richard Smith (richard_at_[hidden])
Date: 2013-06-19 16:00:00


On Wed, Jun 19, 2013 at 1:56 PM, Nelson, Clark <clark.nelson_at_[hidden]> wrote:
>> I objected that I did not want including <cstddef> to require the
>> implementation to perform header search for <optional> and
>> <dynarray>
>> (and whatever other headers we add in the future). I would expect
>> issuing these file system requests to have a measurable cost.
>
> OK. And you don't think it's practical for <cstddef> just to know the right answer, and unconditionally define either or both of those two macros as appropriate?

That is probably practical for <cstddef>, but less so for <stddef.h>,
which is frequently provided by the compiler implementer rather than
by the C++ standard library implementer. If we're happy for <stddef.h>
to not provide these macros, then the suggestion of putting them in
<cstddef> seems fine to me.


SG10 list run by sg10-owner@lists.isocpp.org