Bad Advices

Pages: 1... 345
@Cubbi: what is libc++ then? Compared to libstdc++? Why do I get to have both installed and indicate on the command line which I want to use?
@L B: OS X? I think Apple provides both GCC and clang-based compilers and in addition to libstdc++, which both can use, a custom library too (for clang).
Last edited on
closed account (1yR4jE8b)
libc++ is the LLVM/Clang implementation of the C++ standard library. libstdc++ is the GNU implementation.
LB wrote:
@Cubbi: what is libc++ then? Compared to libstdc++?

libstdc++ is the GNU C++ standard library that accompanies the GNU g++ compiler. It relies on GNU C library for the shared features and supports whatever platforms g++ supports. It's missing a lot of minor and several major C++11 requirements. It doesn't directly support other compilers, but because it is ubiquitious, other compilers implement whatever g++ quirks are needed to be used with it (clang++ and intel did that, for example)

libc++ is a complete (I think, the only complete so far) C++11 standard library implementation written from scratch for Apple. It supports MacOS and relies on BSD C library, although there is work ongoing to support Linux and Windows (it mostly works, but some features are missing). It expects clang++ as the compiler.
Last edited on
On FreeBSD 10, clang++ / libc++ has completely replaced g++ / libstdc++.
closed account (S6k9GNh0)
llvm is good in general. It can be used for on-the-fly or JIT compilation, it can be used as a backend and optimizer to several different platforms for a compiler or VM. It's just... I love it. I would probably marry it if it were legal in my state.

Back on topic, libc++ is co-developed by Apple because Clang is big on Mac OSX. I don't think they created it although don't quote me. It still uses extensions heavily for optimization and it's main goal was licensing differences. libstdc++ works perfectly fine with Clang (as I use it interchangeably with gcc) and supposedly, vice versa (I don't have a Mac nor do I care to test on Linux).
Duoas wrote:
Choosing the worst possible way to do something does not make a valid counter-argument.

Exactly! Just like, if you are at the top of a bridge and want to get to the base fast. Jumping would be the fastest, but definitely not the safest...unless you are suicidal.
Topic archived. No new replies allowed.
Pages: 1... 345