Microsoft released the code from its implementation of STL, the standard C ++ library

open source stls

The CppCon 2019 conference was the venue for the realization of a big announcement from Microsoft, well in her unveiled the release of the STL library source code C ++ standard included with Visual C ++ which as of the announcement is available under a free license, specifically Apache 2.0 (which is quite permissive).

libcxx, the LLVM / Clang C ++ standard library, already uses this license, which should facilitate code exchange between projects. All source code for this library is available and compilable with Visual C ++, but testing is not yet included.

The open project is expected to develop on GitHub and receive pull requests third-party with new features and patches. To become a member, you must sign a CLA code transfer agreement.

The MSVC team believes that the migration from STL to GitHub will help Microsoft customers stay current with the development process, experiment with innovations, and help develop the project.

Instead, developers will be able to use out-of-the-box implementations of the new standards in other projects.

For example, you can exchange code with a libc ++ library that works within the LLVM project. Microsoft emphasizes that STL and libc ++ do not merge, they are still different libraries, with different structures and platforms. However, you can now work on new features for both libraries without worrying about licensing

This implementation of the standard library is not intended to compete with the implementations provided by GCC or Clang, for example: the Microsoft project does not plan to support other platforms than Microsoft.

However, the developers are aiming for a high quality implementation: standards compliant and very fast.

Binary compatibility is guaranteed with Visual C ++ versions 2015 and 2017 (This library is the one provided with the 2019 version), except for the features that were implemented before the finalization of the standard (working documents and technical specifications The C ++ Standards Committee).

The WCBF02 branch (still internal to Microsoft) contains incompatible changes at the binary level, but not at the source level (for a standard library update, you will need to recompile your projects, not just change the DLL). This branch contains a number of improvements and fixes and will be publicly available soon.

Unlike some projects described as free, Microsoft recommends reporting defects and contributing to project code (In this case, it will be necessary to sign a CLA to give Microsoft the necessary rights for the redistribution of contributions, especially in the event that the project license changes, a difficulty that LLVM has faced for several years).

In the near future, Microsoft should add its internal test suite to the project. The internally escalated bug list is being migrated to GitHub. At the moment compilation is done with MSBuild, but a migration to CMake is in progress. C ++ 20 functionality is being implemented.

Other Visual C ++ components should not be available for free licenses. Microsoft justifies this choice by stating that the standard C ++ library is fairly compiler independent (as opposed to the standard C library, for example) and that it evolves very rapidly compared to other compiler components.

The STL source code is located now available on Github where interested persons can download it or be able to examine its code.

The GitHub repository has all the source code for the product, a new CMake and README build system with more information. The library is licensed under the Apache 2.0 license (with the exception of some binaries).

Obviously, this does not affect developers who just want to use the STL, as it is available for use in the Visual Studio IDE. However, developers who want to participate in STL development can do so using the GitHub repository.

The move to GitHub is still underway, but the code can now be cloned and built.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

bool (true)