Open source STL implementations with C++11 support

c++, c++11, stl, stlport

Solution

You can have a look at libc++. It is the standard C++ library for clang. I haven't tried to compile it with a different compiler or on a different Platform than MacOS. While there are certainly compiler dependencies, e.g., in the `<type_traits>` and the headers from the language support library (e.g., `<exception>`, `<type_info>`, etc), I can imagine that most of the code would compile with other compilers.

You already mentioned libstdc++ which seems to work OK with other compilers than gcc, at least on Linux and MacOS: clang used to use libstdc++ on MacOS. However, I don't now how happy libstdc++ is to be compiled with other compilers.

For specific classes, e.g. `std::shared_ptr<T>` or the `std::thread` group of classes, you may get suitable replacement implementations from Boost.

Problem

In short, I'm looking for alternatives to STLPort. STLPort hasn't had an update for some time (since 2008?) and is lacking C++11 support. Does anyone know of any alternatives? I need to compile using various toolchains, for various architectures and various target OSes. I'm going to start looking into the GNU C++ implementation and see how tied in it is to the GCC toolchain as an alternative and will post back with results. But if anyone has any up front knowledge here that'd be great. Alternatives to this would be implementations of various key C++11 STL features like new smart pointer types and std::threads. Worst case I can probably extract smart pointers from boost. Are there any implementations of std::threads in terms of say pthreads or Windows threads? Thanks

Original source

Related problems