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
std::mutex is not declared by <mutex> when the header is included from C++/CLI.
I assume the reason for this is that the implementation is somehow incompatible with C++/CLI? Could this maybe be fixed by using #pragma managed(push, off) around problematic parts?
Even if this is not possible, the current solution has unfortunate side effects: We have a header that defines a C++ class that has a std::mutex as its member. Even though all interactions with that member are implemented in native code, C++/CLI code not interact with this class because the header doesn't compile under C++/CLI.
Workaround: std::shared_mutex is available under C++/CLI.
The text was updated successfully, but these errors were encountered:
Chronial
changed the title
<mutex>: std::mutex not declared when included from C++/CLI
<mutex> std::mutex not declared when included from C++/CLI
Jul 3, 2020
Chronial
changed the title
<mutex> std::mutex not declared when included from C++/CLI
<mutex>: std::mutex not declared when included from C++/CLI
Jul 3, 2020
std::mutex
is not declared by<mutex>
when the header is included from C++/CLI.I assume the reason for this is that the implementation is somehow incompatible with C++/CLI? Could this maybe be fixed by using
#pragma managed(push, off)
around problematic parts?Even if this is not possible, the current solution has unfortunate side effects: We have a header that defines a C++ class that has a
std::mutex
as its member. Even though all interactions with that member are implemented in native code, C++/CLI code not interact with this class because the header doesn't compile under C++/CLI.See also #838
Workaround:
std::shared_mutex
is available under C++/CLI.The text was updated successfully, but these errors were encountered: