http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47453

--- Comment #7 from Johannes Schaub <schaub.johannes at googlemail dot com> 
2011-08-03 19:17:04 UTC ---
(In reply to comment #6)

> > 
> > You can define it as follows to make it work in both cases
> > 
> >     #define PTHREAD_COND_INITIALIZER {}
> 
> I cannot define/redefine this value. It's already defined in system headers...

Ah I wasn't aware. You can at least workaround it though.

class cond_variable
{
    struct { ::pthread_cond_t cond; } wrapper;

public:
    constexpr cond_variable() : wrapper{PTHREAD_COND_INITIALIZER} {}
};

Reply via email to