[Bug c++/47453] [DR 1214] Various non-conforming behaviors with braced-init-list initialization
schaub.johannes at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 3 19:17:00 GMT 2011
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} {}
};
More information about the Gcc-bugs
mailing list