[cfe-dev] [libcxx] Which headers must include other headers?
Craig, Ben via cfe-dev
cfe-dev at lists.llvm.org
Thu Mar 10 07:39:53 PST 2016
On 3/10/2016 9:34 AM, Howard Hinnant wrote:
> On Mar 10, 2016, at 9:02 AM, Craig, Ben via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>> My motivation is that I'm running a conformance test suite on my platform (Hexagon + libcxx + libcxxabi + modified Dinkumware C library). For the portion covering <system_error>, I get a lot of failures because the test suite tries to use / instantiate std::string, and it believes that it should be able to get the template definition transitively through <system_error>.
>>
>> I like the compile time benefits of a forward string declaration, I just want to be sure it's conformant. If not, I'm fine reporting the test as faulty.
> This is a minor test suite bug. <system_error> is not required to include <string>.
>
> There are a few instances where the standard does require one header to include another. For example <utility> is required to include <initiailizer_list>. When this is so, the synopsis of one header will have the required #include of the other header (in the standard).
Funny you should mention <utility> including <initializer_list>, because
libcxx currently doesn't do that :). The test suite caught that one as
well, but [res.on.headers] seems much more clear cut about that one. I
plan on fixing that, but I'm still in the triage and categorization
phases of running the test suite.
>
> There are a few places in the standard that appear to have a circular dependency among the headers. Care must be taken in the implementation to not actually create a circular dependency.
>
> Howard
>
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the cfe-dev
mailing list