<div class="gmail_extra"><div class="gmail_quote">2012/11/11 Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com" target="_blank">hhinnant@apple.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Nov 11, 2012, at 12:51 PM, Ruben Van Boxem <<a href="mailto:vanboxem.ruben@gmail.com">vanboxem.ruben@gmail.com</a>> wrote:<br>
<br>
>> 2012/11/11 Howard Hinnant <<a href="mailto:hhinnant@apple.com">hhinnant@apple.com</a>><br>
>><br>
>> On Nov 11, 2012, at 12:31 PM, Ruben Van Boxem <<a href="mailto:vanboxem.ruben@gmail.com">vanboxem.ruben@gmail.com</a>> wrote:<br>
>><br>
>> > Hi,<br>
>> ><br>
>> > I wanted to take another look at libc++ on Windows,<br>
>><br>
>> Thanks!<br>
>><br>
>> > but I get a build failure due to (I think) libc++ itself:<br>
>> ><br>
>> > + clang++ -c -g -Os -fPIC -std=c++0x -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion -Wpadded -Wmissing-prototypes -Wstrict-aliasing=2 -Wstrict-overflow=4 -nostdinc++ -I../include ../src/condition_variable.cpp<br>

>> > In file included from ../src/condition_variable.cpp:10:<br>
>> > ../include\condition_variable:158:25: error: constructor for 'std::__1::condition_variable_any' must explicitly initialize the member '__cv_' which does not have a default constructor<br>
>> > condition_variable_any::condition_variable_any()<br>
>> >                         ^<br>
>><br>
>> Just looking at this first one:  condition_variable is required to have a default constructor.  condition_variable (in <__mutex_base>) is currently only implemented on top of pthread_cond_t, and does have a default constructor if pthread_cond_t exists.  Does pthread_cond_t exist in your environment?<br>

>><br>
> Yes, I rely on winpthreads to provide the stuff used by libc++ (I really should take the time to learn all this and write a proper Win32 implementation, but I'm currently too lazy to do so ;-)). pthread_cond_t is defined in pthread.h. I checked the preprocessed source (attached) and it is indeed typedef'ed. This worked last time I updated the test results :/<br>

<br>
</div>So can you default construct a condition_variable?  I note in your preprocess:<br>
<br>
    constexpr condition_variable() : __cv_((pthread_cond_t *)((void *) (size_t) -1)) {}<br>
<br>
which looks like a valid condition_variable default constructor to me, as long as it compiles...<br>
<span class="HOEnZb"><font color="#888888"><br>
Howard<br>
<br></font></span></blockquote><div><br>Someone has informed me an SVN Clang build does work, so it must be a Clang 3.1 issue. I'll build a new Clang and continue with that then.<br><br>Thanks,<br><br>Ruben <br></div>
</div><br></div>