UMutex not is_trivially_constructible

Description

We are seeing a compile error on Windows with the clang compiler, a failing

in umutex.cpp.

Turns out is_trivially_constructible is not guaranteed for the std::atomic<pointer> inside the UMutex.

Activity

Show:
Markus Scherer
October 2, 2019, 6:10 PM

PR 870 "UMutex not trivially but constexpr constructible" should do.

For the record, if this is not good enough, here is another idea we discussed briefly:

umutex.cpp has some trickery for the global mutex, using a std::once_flag and a pointer to it so it can be recycled. If needed, we could probably replace the std::atomic<std::mutex *> fMutex with a raw pointer plus a once_flag and a once_flag* and do the same trick inside UMutex::getMutex() and UMutex::cleanup().

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Markus Scherer

Reporter

Markus Scherer

Components

Priority

major

Time Needed

Hours

Fix versions