Skip to content

<mutex>: std::mutex not declared when included from C++/CLI #980

@Chronial

Description

@Chronial

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions