This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using PCH branch to make precompiled std include


Nathan Myers wrote:

Let me guess wildly at what's happening here. The basic_string<> constructor and destructor refer to std::allocator, which hasn't explicitly been included here. It may be that either the PCH apparatus needs to be smarter about revealing definitions needed (transitively) by other standard headers, or we need to be more thorough about explicitly sub-including in standard headers the other
headers it takes to use one.

Thanks for your feedback. This is how the installed <string> begins:

#ifndef _CPP_STRING
#define _CPP_STRING    1

#pragma GCC system_header

#include <bits/c++config.h>
#include <bits/stringfwd.h>
#include <bits/char_traits.h>
#include <memory>     // For allocator.

So...

Also, as expected, nothing changes if <memory> is added to header.h...

Paolo.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]