Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ standard library implementations in different compilers

I was wondering which C++ standard libraries are in use in different C++ compilers. I tried searching for it, but couldn't find a comprehensive list.

I know Dinkumware's implementation is used by msvc and icc, libstdc++ is used by gcc, and libc++ is used in clang. But what about Digital Mars C++, or Embarcadero's bcc, or IBM's xlC++?

like image 651
Borislav Stanimirov Avatar asked May 27 '13 13:05

Borislav Stanimirov


1 Answers

A shortlist:

  • GCC: uses its own libstdc++.
  • MSVC: uses its own msvcrp, which is bought from Dinkumware, then dismembered to work around MSVC's bad C++ language support (so it's not really Dinkumware anymore).
  • Clang: uses LLVM's libc++ if passed the -stdlib=libc++ option. It can also use GCC's libstdc++ and in also MSVC's library (it generates binary compatible code in all cases).
  • ICC: uses GCC libstdc++ on Linux and MSVC's library on Windows. It also tries to mimick both compilers on these platforms.

Note there are other compilers and (independent) C++ standard library implementations I have not covered here.

like image 133
rubenvb Avatar answered Oct 25 '22 02:10

rubenvb