<div dir="ltr">I think there might be something wrong with your installation.<br><br><div>clang++ -std=c++0x hello.cpp <br>clang++ -std=c++11 hello.cpp<br><br></div><div>Both works fine here and creates an exe a.out<br></div>
<div>Which version of clang/llvm are you using?<br><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 October 2013 13:33, C K Kashyap <span dir="ltr"><<a href="mailto:ckkashyap@gmail.com" target="_blank">ckkashyap@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I'd really appreciate some pointers in this regard.</div><div>Regards,</div><div>Kashyap</div>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 16, 2013 at 5:43 PM, C K Kashyap <span dir="ltr"><<a href="mailto:ckkashyap@gmail.com" target="_blank">ckkashyap@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Sorry ... I missed mentioning the details - </div><div><br></div>this is the error I get - <div><div>


<br></div><div><div>root@no1slu398:~/Documents/LLVM/tmp# clang++ -std=c++0x  hello.cpp</div><div>In file included from hello.cpp:1:</div>
<div>In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/thread:38:</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:535:6: error: no matching constructor for initialization of 'duration' (aka</div>



<div>      'std::chrono::duration<long, std::ratio<1, 1000000> >')</div><div>          : __d(__t.time_since_epoch())</div><div>            ^   ~~~~~~~~~~~~~~~~~~~~~~</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/condition_variable:106:42: note: in instantiation of function template specialization</div>



<div>      'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long, std::ratio<1, 1000000> > >::time_point<std::chrono::duration<long,</div><div>      std::ratio<1, 1000000000> > >' requested here</div>



<div>        const __clock_t::time_point __s_atime = __s_entry + __delta;</div><div>                                                ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:234:12: note: candidate constructor not viable: no known conversion from</div>



<div>      'duration<[...], ratio<[...], 1000000000>>' to 'const duration<[...], ratio<[...], 1000000>>' for 1st argument</div><div>        constexpr duration(const duration&) = default;</div>



<div>                  ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:237:19: note: candidate template ignored: disabled by 'enable_if' [with _Rep2 =</div><div>      std::chrono::duration<long, std::ratio<1, 1000000000> >]</div>



<div>               enable_if<is_convertible<_Rep2, rep>::value</div><div>                         ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:244:19: note: candidate template ignored: disabled by 'enable_if' [with _Rep2 = long, _Period2</div>



<div>      = std::ratio<1, 1000000000>]</div><div>               enable_if<treat_as_floating_point<rep>::value</div><div>                         ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:232:12: note: candidate constructor not viable: requires 0 arguments, but 1 was provided</div>



<div>        constexpr duration() : __r() { }</div><div>                  ^</div><div>1 error generated.</div><div>root@no1slu398:~/Documents/LLVM/tmp# cat hello.cpp</div><div>#include <thread></div><div><br></div>


<div>
int main() {</div><div>  return 0;</div><div>}</div></div></div><div><br></div><div><br></div><div>Regards,</div><div>Kashyap</div><div><br></div></div><div><div><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Wed, Oct 16, 2013 at 7:40 AM, Ben Pope <span dir="ltr"><<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 15/10/13 22:22, C K Kashyap wrote:<br>
> Hi,<br>
> I'd like to try out the new c++11 features using clang. However, I am<br>
> running into some issue or the other on both Windows and Linux. In both<br>
> cases, it looks like the problem is due to headers from VC/g++.<br>
> I was wondering if someone can point me to some steps on setting up a<br>
> Windows or Linux(ubuntu 12.04 LTS) box for exploring clang.<br>
> I was able to successfully build clang on my ubuntu but that did not<br>
> help in building my sample CPP files.<br>
<br>
</div></div>It might help if you give us the compiler error and version of clang<br>
you've compiled.<br>
<br>
I can compile C++ programs with libstdc++ or libc++ without issue.<br>
<br>
Windows support is experimental at the moment, so let's stick with<br>
Ubuntu for now.<br>
<span><font color="#888888"><br>
Ben<br>
</font></span><div><div><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>