Open
Description
Ran into a small issue while building a project of mine.
construct_at and destroy_at are from the memory header.
When the precompiled module is specified on the command line for the memory header, the compiler will see the functions, but will not compile the code since memory is not imported. However, the compiler then suggests to include an implementation-defined header. The correct behaviour should be to suggest to import, not include the standard header it is in, memory in this case.
import<bit>;
struct Q{};
void r()
{
char unsigned arr[sizeof(Q)];
Q*p = reinterpret_cast<Q*>(arr);
std::construct_at<Q>(p);
std::destroy_at<Q>(p);
}
The command used to compile this is.
clang++ -std=c++20 -stdlib=libc++ -fmodule-file=ccm.cache/bit.pcm -fmodule-file=ccm.cache/memory.pcm -c PROGRAM_FILE
I have not tested if the additional header import is required to reproduce this bug.