public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49894] New: Uniform initialization in constructor (C++0x)
@ 2011-07-29  6:17 d.v.a at ngs dot ru
  2011-07-29  6:29 ` [Bug c++/49894] " d.v.a at ngs dot ru
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: d.v.a at ngs dot ru @ 2011-07-29  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Uniform initialization in constructor (C++0x)
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.v.a@ngs.ru


#include<pthread.h>

class cond_variable
{
    ::pthread_cond_t cond;
public:
    constexpr cond_variable() : cond(PTHREAD_COND_INITIALIZER) {}
};
int main() {}

test.cpp: In constructor 'constexpr cond_variable::cond_variable()':
test.cpp:7:84: error: could not convert '{{0, 0}, 0, "", 0}' from
'<brace-enclosed initializer list>' to 'pthread_cond_t'

Variant
constexpr cond_variable() : cond((::pthread_cond_t)PTHREAD_COND_INITIALIZER) {}
is Ok.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-06-15  8:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29  6:17 [Bug c++/49894] New: Uniform initialization in constructor (C++0x) d.v.a at ngs dot ru
2011-07-29  6:29 ` [Bug c++/49894] " d.v.a at ngs dot ru
2011-07-29 10:08 ` rguenth at gcc dot gnu.org
2011-07-29 10:13 ` d.v.a at ngs dot ru
2011-07-29 10:17 ` d.v.a at ngs dot ru
2011-10-14 19:29 ` [Bug libstdc++/49894] [C++0x] Uniform initialization in constructor jason at gcc dot gnu.org
2011-10-14 23:05 ` paolo.carlini at oracle dot com
2011-10-15 12:26 ` redi at gcc dot gnu.org
2011-10-15 12:54 ` redi at gcc dot gnu.org
2011-10-15 19:54 ` paolo.carlini at oracle dot com
2011-10-24 23:27 ` redi at gcc dot gnu.org
2011-10-24 23:30 ` redi at gcc dot gnu.org
2011-11-05 13:34 ` redi at gcc dot gnu.org
2012-06-15  8:51 ` d.v.a at ngs dot ru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).