Skip to content

Standard Library Modules: bogus error C2504: 'std::filesystem::_Dir_enum_impl': base class undefined #3333

@StephanTLavavej

Description

@StephanTLavavej

On Discord, @davidhunter22 provided the following test case which is very similar to #3330, but which isn't helped by @fsb4000's workaround #3331:

D:\GitHub\STL\out\x64>type woof.cpp
import std;

int main() {
    std::filesystem::directory_iterator x{"."};
}
D:\GitHub\STL\out\x64>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od out\modules\std.ixx woof.cpp /Fewoof.exe
std.ixx
woof.cpp
woof.cpp(5): error C2504: 'std::filesystem::_Dir_enum_impl': base class undefined
Generating Code...

I was unable to work around this by adding _EXPORT_STD and/or extern "C++", so it appears that we need to report an additional compiler bug beyond DevCom-10247495.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerCompiler work involvedmodulesC++23 modules, C++20 header unitsresolvedSuccessfully resolved without a commit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions