You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use vs and use std::this_thread::sleep_for in a C++ module, I get an error.
'std::this_thread::sleep_until': no matching overloaded function found
binary '+': 'const std::chrono::time_point<std::chrono::steady_clock,std::chrono::duration<__int64,std::ratio<1,1000000000>>>' does not define this operator or a conversion to a type acceptable to the predefined operator
binary '+=': no global operator found which takes type 'const std::chrono::duration<__int64,std::ratio<1,1000>>' (or there is no acceptable conversion)
binary '-': 'const std::chrono::time_point<std::chrono::steady_clock,std::chrono::duration<__int64,std::ratio<1,1000000000>>>' does not define this operator or a conversion to a type acceptable to the predefined operator
binary '>': 'const std::chrono::duration<__int64,std::ratio<1,1000>>' does not define this operator or a conversion to a type acceptable to the predefined operator
The minimum duplicate file is as follows:
Mouse.ixx
A possible solution:
Modify #include <thread> and #include <chrono> in Mouse.ixx to import std to pass the compilation. The modified Mouse.ixx file is as follows:
When I use vs and use std::this_thread::sleep_for in a C++ module, I get an error.
The minimum duplicate file is as follows:
Mouse.ixx
main.cpp
A possible solution:
Modify
#include <thread>
and#include <chrono>
in Mouse.ixx toimport std
to pass the compilation. The modified Mouse.ixx file is as follows:The main.cpp file does not need to be modified and can now be compiled.
I am using the vs version:
The text was updated successfully, but these errors were encountered: