I have a couple of questions.
1) What is libc++
and libstdc++
?
2) What is the difference between them ?
3) Are they interchangeable ?
4) Is it something a compiler should implement ?
5) When should I use one or another ?
I have a couple of questions.
1) What is libc++
and libstdc++
?
2) What is the difference between them ?
3) Are they interchangeable ?
4) Is it something a compiler should implement ?
5) When should I use one or another ?
libstdc++ is the GNU c++ standard library implementation.
libc++ is the LLVM/clang c++ standard library implementation.
Even when compiling with clang, libstdc++ (gnu) is often used (on Linux).
A main reason libc++ (clang) exists is that libstdc++ (gnu) is GPL and so Apple can't ship it, so you can think of libc++ as the non-GPL libstdc++.
1) What is libc++ and libstdc++ ?
They are implementations of the C++ standard library.
2) What is the difference between them ?
They are entirely different implementations.
3) Are they interchangeable ?
Yes, you should be able to use them interchangeably. (However you can't easily use both in the same program.)
5) When should I use one or another ?
You shouldn't have to worry about that. Your code should work with any standard library implementation.
© 2022 - 2024 — McMap. All rights reserved.