On 2012-09-10 22:17, Dimitry Andric wrote:
...
Benjamin Kramer suggested to use parentheses around the initializers, as
per the attached patch. He checked that this works on OSX, and I can
verify it works on FreeBSD.
And now for the correct patch, where I didn't mangle the mutex
destructor. Sorry about that. :)
Index: include/__mutex_base
===================================================================
--- include/__mutex_base (revision 163600)
+++ include/__mutex_base (working copy)
@@ -39,7 +39,7 @@ class _LIBCPP_VISIBLE mutex
public:
_LIBCPP_INLINE_VISIBILITY
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
- constexpr mutex() _NOEXCEPT : __m_ PTHREAD_MUTEX_INITIALIZER {}
+ constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {}
#else
mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;}
#endif
@@ -305,7 +305,7 @@ class _LIBCPP_VISIBLE condition_variable
public:
_LIBCPP_INLINE_VISIBILITY
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
- constexpr condition_variable() : __cv_ PTHREAD_COND_INITIALIZER {}
+ constexpr condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {}
#else
condition_variable() {__cv_ = (pthread_cond_t)PTHREAD_COND_INITIALIZER;}
#endif
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits