-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingcompilerCompiler work involvedCompiler work involvedmodulesC++23 modules, C++20 header unitsC++23 modules, C++20 header unitsresolvedSuccessfully resolved without a commitSuccessfully resolved without a commit
Description
Repros with VS 2022 17.11 Preview 3. Reported by CppMan on Discord.
I'm not familiar enough with coroutines, or with multiple module scenarios, to say what should happen when a module tries to export a partial specialization like std::coroutine_traits<TestModule::FireAndForget, Ts...>.
C:\Temp>type meow.ixx
export module Module;
import std;
export namespace TestModule {
struct FireAndForget {};
} // namespace TestModule
export template <typename... Ts>
struct std::coroutine_traits<TestModule::FireAndForget, Ts...> {
struct promise_type {
TestModule::FireAndForget get_return_object() const noexcept {
return {};
}
void return_void() const noexcept {}
std::suspend_never initial_suspend() const noexcept {
return {};
}
std::suspend_never final_suspend() const noexcept {
return {};
}
void unhandled_exception() const noexcept {}
};
};C:\Temp>type test.cpp
import Module;
import std;
TestModule::FireAndForget Test() {
co_return;
}
int main() {
Test();
}C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od /c "%VCToolsInstallDir%\modules\std.ixx"
std.ixx
C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od /c meow.ixx
meow.ixx
C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od test.cpp meow.obj std.obj
test.cpp
test.cpp(5): error C2039: 'promise_type': is not a member of 'std::coroutine_traits<TestModule::FireAndForget>'
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.41.34021\include\coroutine(46): note: see declaration of 'std::coroutine_traits<TestModule::FireAndForget>'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompilerCompiler work involvedCompiler work involvedmodulesC++23 modules, C++20 header unitsC++23 modules, C++20 header unitsresolvedSuccessfully resolved without a commitSuccessfully resolved without a commit