<div class="gmail_extra"><div class="gmail_quote"><div class="gmail_extra"><div class="gmail_quote"><div class="im">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><br>
On Nov 11, 2012, at 12:31 PM, Ruben Van Boxem <<a href="mailto:vanboxem.ruben@gmail.com" target="_blank">vanboxem.ruben@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I wanted to take another look at libc++ on Windows,<br>
<br>
</div>Thanks!<br>
<div><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>
</div>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>

</blockquote></div><div><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 :/<span class="HOEnZb"><font color="#888888"><br>

<br>Ruben <br><br></font></span></div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Howard<br>
<div><div><br>
<br>
> ../include\condition_variable:121:24: note: member is declared here<br>
>     condition_variable __cv_;<br>
>                        ^<br>
> ../include\__mutex_base:301:23: note: 'std::__1::condition_variable' declared here<br>
> class _LIBCPP_VISIBLE condition_variable<br>
>                       ^<br>
> In file included from ../src/condition_variable.cpp:11:<br>
> ../include\thread:433:11: error: no matching constructor for initialization of 'std::__1::mutex'<br>
>     mutex __mut;<br>
>           ^<br>
> ../include\__mutex_base:48:5: note: candidate constructor not viable: requires 1 argument, but 0 were provided<br>
>     mutex(const mutex&);// = delete;<br>
>     ^<br>
> In file included from ../src/condition_variable.cpp:11:<br>
> ../include\thread:434:24: error: no matching constructor for initialization of 'std::__1::condition_variable'<br>
>     condition_variable __cv;<br>
>                        ^<br>
> ../include\__mutex_base:314:5: note: candidate constructor not viable: requires 1 argument, but 0 were provided<br>
>     condition_variable(const condition_variable&); // = delete;<br>
>     ^<br>
> In file included from ../src/condition_variable.cpp:10:<br>
> In file included from ../include\condition_variable:112:<br>
> ../include\memory:2087:40: error: constructor for<br>
>       'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<std::__1::mutex>, std::__1::mutex, 1>' must explicitly initialize the member '__second_' which does not have a default constructor<br>


>     _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1)<br>
>                                        ^<br>
> ../include\memory:2369:11: note: in instantiation of member function<br>
>       'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<std::__1::mutex>, std::__1::mutex, 1>::__libcpp_compressed_pair_imp' requested here<br>
>         : base(_VSTD::forward<_T1_param>(__t1)) {}<br>
>           ^<br>
> ../include\memory:3693:12: note: in instantiation of member function<br>
>       'std::__1::__compressed_pair<std::__1::allocator<std::__1::mutex>, std::__1::mutex>::__compressed_pair' requested here<br>
>         :  __data_(_VSTD::move(__a)) {}<br>
>            ^<br>
> ../include\memory:4272:26: note: in instantiation of member function<br>
>       'std::__1::__shared_ptr_emplace<std::__1::mutex, std::__1::allocator<std::__1::mutex>>::__shared_ptr_emplace' requested here<br>
>     ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);<br>
>                          ^<br>
> ../include\memory:4631:12: note: in instantiation of function template specialization<br>
>       'std::__1::shared_ptr<std::__1::mutex>::make_shared<>' requested here<br>
>     return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);<br>
>            ^<br>
> ../include\condition_variable:159:14: note: in instantiation of function template specialization 'std::__1::make_shared<std::__1::mutex, >' requested here<br>
>     : __mut_(make_shared<mutex>()) {}<br>
>              ^<br>
> ../include\memory:2075:9: note: member is declared here<br>
>     _T2 __second_;<br>
>         ^<br>
> ../include\__mutex_base:34:23: note: 'std::__1::mutex' declared here<br>
> class _LIBCPP_VISIBLE mutex<br>
>                       ^<br>
> 4 errors generated.<br>
><br>
> This is with Clang 3.1. Any ideas?<br>
><br>
> Thanks,<br>
><br>
> Ruben<br>
><br>
> PS: please keep me in CC, I am not subscribed to cfe-dev<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div></div></div><br></div>
</div><br></div>