Google has made public a set of C++ libraries used internally in its project, and will soon make public its Python library.

Abseil has been in development at Google for more than a decade. It is designed to support the needs of Google programmers working on a variety of projects, including Protocol Buffers, gRPC and TensorFlow. Google reviews Abseil as follows:

Initially, the abstractions provided by Abseil were not part of C++ 14 or C++ 17, but eventually they were added to the C++ standard. For example, Google provides a type called StringPiece, and then C++ 17 adds a similar type called STD ::string_view. In order to have a consistent API with the new C++ 17 type, Google refactors StringPiece to absl::string_view. From an underlying mechanism, if the developer is using C++ 17, Abseil’s string_view defaults to the standard implementation; If the developer is using a version of C++ prior to C++ 17, string_view defaults to Google’s implementation.

The advantage of using Abseil is that you have access to C++ features that have not yet been added to the standard, and once they are, Google guarantees that they will be refactored to use the standard by default. Google encourages developers to use Abseil, noting that more than 250 million lines of C++ code already use it and that almost all projects built from scratch use it. This means that Abseil is widely used by Google and is maintained frequently to keep pace with project requirements.

Abseil includes the following libraries:

  • Base: initialization, and other base code.
  • algorithm: to the c + +<algorithm>Library additions and a container-based version of the original algorithm.
  • Container: Provides more STL type containers.
  • Debugging: Debug library used to check for leaks.
  • memory: includes C++ 11 compatible versionsstd::make_unique()And memory management.
  • metaIncludes type checking compatible with C++ 11 versions, C++ 14 and C++ 17 versions of C++<type_traits>Library available.
  • Numeric: 128-bit integers compatible with C++ 11.
  • Strings: Various string tools.
  • Synchronization: concurrency primitives and synchronization abstractions.
  • Time: Abstracts the absolute point-in-time and time-zone operations.
  • Types: Types of non-container tools.

The code for Abseil is Apache licensed and published on GitHub. A Python version of its software library will be released later.

Google Open Sources Abseil, a Collection of C++ and Python Utilities