http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56002
Bug #: 56002 Summary: [mutex] allow generic classes to be used without requiring plattform support for threads Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: n...@chello.at Created attachment 29179 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29179 patch for mutex. diffed against 4.7.2 I am using gcc & libstdc++ on a plattform that isnt natively supported and thus thread-functionality is not available from libstdc++. However I would like to be able to still use std::lock_guard, std::unique_lock, std::lock with my own mutex-classes. There ist no technical reason to prevent use of those generic classes and functions which are deliberately designed to work with custom implementations. ---mutex like it is now (all-or-nothing): #if HAS_GCC_THREADS <mutexes definiton> <generic stuff like defer_lock_t,lock_guard, unique_lock, lock> <once_flag> #endif ---------------------------------------- ---mutex like it should be: #if HAS_GCC_THREADS <mutexes definiton> #endif <generic stuff like defer_lock_t,lock_guard, unique_lock, lock> #if HAS_GCC_THREADS <once_flag> #endif ----------------------------------------