This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47453] [DR 1214] Various non-conforming behaviors with braced-init-list initialization
- From: "schaub.johannes at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Aug 2011 19:17:42 +0000
- Subject: [Bug c++/47453] [DR 1214] Various non-conforming behaviors with braced-init-list initialization
- Auto-submitted: auto-generated
- References: <bug-47453-4@http.gcc.gnu.org/bugzilla/>
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} {}
};