<p dir="ltr">See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53841">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53841</a></p>
<div class="gmail_quote">On Jan 3, 2013 8:38 AM, "Martin Martin" <<a href="mailto:martin@silverliningsystems.com">martin@silverliningsystems.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>Compiling the following 1-line file:<br><br>#include <condition_variable><br><br>Causes the error:<br><br><font size="1"><span style="font-family:courier new,monospace">$ clang++ -std=c++11 ./foo.cpp <br>
In file included from ./foo.cpp:1:<br>
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/condition_variable:37:<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/chrono:539:6: error: no matching constructor for<br>
initialization of 'duration' (aka 'std::chrono::duration<long, std::ratio<1, 1000000> >')<br> : __d(__t.time_since_epoch())<br> ^ ~~~~~~~~~~~~~~~~~~~~~~<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/condition_variable:110:42: note: in instantiation of<br>
function template specialization 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long,<br> std::ratio<1, 1000000> > >::time_point<std::chrono::duration<long, std::ratio<1, 1000000000> > >' requested here<br>
const __clock_t::time_point __s_atime = __s_entry + __delta;<br> ^<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/chrono:233:12: note: candidate constructor not viable: no<br>
known conversion from 'duration<[...], ratio<[...], 1000000000>>' to 'duration<[...], ratio<[...], 1000000>>'<br> for 1st argument<br> constexpr duration(const duration&) = default;<br>
^<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/chrono:239:23: note: candidate template ignored: couldn't<br> infer template argument ''<br> constexpr explicit duration(const _Rep2& __rep)<br>
^<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/chrono:246:14: note: candidate template ignored: couldn't<br> infer template argument ''<br> constexpr duration(const duration<_Rep2, _Period2>& __d)<br>
^<br>/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/chrono:231:12: note: candidate constructor not viable:<br> requires 0 arguments, but 1 was provided<br> constexpr duration() : __r() { }<br>
^<br>1 error generated.<br><br></span></font>Searching the web doesn't turn up anything related.<br><br>This is on Ubuntu 12.10, with Clang branches/release_32 compiled from source in release mode.<br>
<br>Any idea what I should look at next?<br><br>Thanks,<br>Martin<br>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">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>