C++ Logo

sg10

Advanced search

Re: [SG10] __has_include

From: Richard Smith <richard_at_[hidden]>
Date: Wed, 19 Jun 2013 14:00:00 -0700
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.

Received on 2013-06-19 23:00:02