"libc++" C++ Standard Library

libc++ is a new implementation of the C++ standard library, targeting C++11.

All of the code in libc++ is dual licensed under the MIT license and the UIUC License (a BSD-like license).

Features and Goals

Why a new C++ Standard Library for C++11?

After its initial introduction, many people have asked "why start a new library instead of contributing to an existing library?" (like Apache's libstdcxx, GNU's libstdc++, STLport, etc). There are many contributing reasons, but some of the major ones are:

Platform Support

libc++ is known to work on the following platforms, using g++-4.2 and clang (lack of C++11 language support disables some functionality).

Current Status

Here is a by-chapter breakdown of what is passing tests and what isn't. This chart is currently based on testing against clang++ with -std=c++11 on Apple's OS X.

Ports to other platforms are underway. Here are recent test results for Windows and Linux.

Get it and get involved!

First please review our Developer's Policy.

To check out the code, use:

On Mac OS 10.7 (Lion) and later, the easiest way to get this library is to install Xcode 4.2 or later. However if you want to install tip-of-trunk from here (getting the bleeding edge), read on. However, be warned that Mac OS 10.7 will not boot without a valid copy of libc++.1.dylib in /usr/lib.

Next:

That should result in a libc++.1.dylib and libc++.dylib. The safest thing to do is to use it from where your libcxx is installed instead of replacing these in your Mac OS.

To use your system-installed libc++ with clang you can:

To use your tip-of-trunk libc++ on Mac OS with clang you can:

To run the libc++ test suite (recommended):

Notes

Building libc++ with -fno-rtti is not supported. However linking against it with -fno-rtti is supported.

Send discussions to the (clang mailing list).

Design Documents