https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108836
Bug ID: 108836 Summary: std::mutex disappears in single-threaded libstdc++ builds Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: pdimov at gmail dot com Target Milestone: --- We've been getting reports in Boost that our uses of <mutex> and std::mutex don't work in a single-threaded build of libstdc++, so we had to add configuration macros to avoid these issues. One example is https://github.com/boostorg/system/commit/53c00841fc0d892bf43cda60e3ea2f05c4362b32, another https://github.com/boostorg/url/issues/684. Is there a reason not to make std::mutex available in single threaded builds, with its operations being no-ops?