[cfe-dev] Using c++11 features in clang
Joseph Galbraith
galb at vandyke.com
Thu Jul 5 12:41:24 PDT 2012
On 07/05/2012 12:29, Marshall Clow wrote:
> In response to a some questions on the boost-users list (and boost bug reports), I wrote up this:
> http://marshall.calepin.co/llvmclang-and-standard-libraries-on-mac-os-x.html
>
> I don't know if this should be a FAQ entry for Boost, or for clang.
> Suggestions/comments/edits welcome.
Isn't one of both of -std=c++11 and -stdlib=libc++ an ABI change?
If so, it should probably be noted that all code should be build with
the same settings for these flags.
In particular, I think that you can't pass a std:: classes from libstdc++
built code to libc++ code without bad things happening.
I'm not sure whether just turning whether the following is safe or not:
clang++ -c -stdlib=libc++ x.cpp
clang++ -c -stdlib=libc++ -std=c++11 y.cpp
clang++ -stdlib=libc++ x.o y.o
Thanks,
Joseph
More information about the cfe-dev
mailing list