ABSEIL - LET THE SAVIOR COME
IGOR SADCHENKO
IGOR.SADCHENKO@GMAIL.COM
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Why Adopt Abseil?
Or: Why the world has room for another collection of C++ utility libraries
There are a few main reasons we recommend Abseil as your first choice for
utility code when starting a new C++ project:
Compatibility with current and future C++ standards, and planned evolution over
time
Compatibility with Google OSS projects - these are the foundational types for
things like Protocol Buffers, gRPC, and TensorFlow
Upgrade Support - make it easy to live at head
Production Experience - These are the interfaces that we are using in Google
production
Interest in a different set of design priorities than the C++ standard
3
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Codemap
The Abseil codebase consists of the following C++ library components:
base Abseil Fundamentals
The base library contains initialization code and other code which all other Abseil code depends on.
Code within base may not depend on any other code (other than the C++ standard library).
algorithm
The algorithm library contains additions to the C++ <algorithm> library and container-based versions
of such algorithms.
container
The container library contains additional STL-style containers.
debugging
The debugging library contains code useful for enabling leak checks. Future updates will add
stacktrace and symbolization utilities.
memory
The memory library contains C++11-compatible versions of std::make_unique() and related memory
management facilities.
4
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Codemap
The Abseil codebase consists of the following C++ library components:
meta
The meta library contains C++11-compatible versions of type checks available within C++14 and C++17 versions of the C++
<type_traits> library.
numeric
The numeric library contains C++11-compatible 128-bit integers.
strings
The strings library contains a variety of strings routines and utilities, including a C++11-compatible version of the C++17
std::string_view type.
synchronization
The synchronization library contains concurrency primitives (Abseil’s absl::Mutex class, an alternative to std::mutex) and a
variety of synchronization abstractions.
time
The time library contains abstractions for computing with absolute points in time, durations of time, and formatting and parsing
time within time zones.
types
The types library contains non-container utility types, like a C++11-compatible version of absl::optional.
5
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
C++11 and Above
Linux:
gcc, clang: -std=c++11
gcc, clang: -std=c++14
clang < 5.0: -std=c++1z
gcc, clang 5.0+: -std=c++17
6
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
C++11 and Above
Mac OS X:
gcc, clang: -std=c++11
gcc, clang: -std=c++14
clang < 5.0: -std=c++1z
gcc, clang 5.0+: -std=c++17
7
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
C++11 and Above
Windows:
msvc /std:c++14
msvc /std:c++latest
8
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Supported Platforms
9
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Supported Platforms
10
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Supported Platforms
11
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
Supported Platforms
12
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
LINKS
Abseil
https://abseil.io
CppCon 2017: Titus Winters “C++ as a "Live at Head" Language”
https://www.youtube.com/watch?v=tISy7EJQPzI
13
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
GET STARTED!
14
C++ COREHARD AUTUMN 2017
IGOR SADCHENKO // C++ COREHARD // 14.10.17
THANKS!

Abseil - let the savior come?

  • 1.
    ABSEIL - LETTHE SAVIOR COME IGOR SADCHENKO IGOR.SADCHENKO@GMAIL.COM
  • 3.
    C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Why Adopt Abseil? Or: Why the world has room for another collection of C++ utility libraries There are a few main reasons we recommend Abseil as your first choice for utility code when starting a new C++ project: Compatibility with current and future C++ standards, and planned evolution over time Compatibility with Google OSS projects - these are the foundational types for things like Protocol Buffers, gRPC, and TensorFlow Upgrade Support - make it easy to live at head Production Experience - These are the interfaces that we are using in Google production Interest in a different set of design priorities than the C++ standard
  • 4.
    3 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Codemap The Abseil codebase consists of the following C++ library components: base Abseil Fundamentals The base library contains initialization code and other code which all other Abseil code depends on. Code within base may not depend on any other code (other than the C++ standard library). algorithm The algorithm library contains additions to the C++ <algorithm> library and container-based versions of such algorithms. container The container library contains additional STL-style containers. debugging The debugging library contains code useful for enabling leak checks. Future updates will add stacktrace and symbolization utilities. memory The memory library contains C++11-compatible versions of std::make_unique() and related memory management facilities.
  • 5.
    4 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Codemap The Abseil codebase consists of the following C++ library components: meta The meta library contains C++11-compatible versions of type checks available within C++14 and C++17 versions of the C++ <type_traits> library. numeric The numeric library contains C++11-compatible 128-bit integers. strings The strings library contains a variety of strings routines and utilities, including a C++11-compatible version of the C++17 std::string_view type. synchronization The synchronization library contains concurrency primitives (Abseil’s absl::Mutex class, an alternative to std::mutex) and a variety of synchronization abstractions. time The time library contains abstractions for computing with absolute points in time, durations of time, and formatting and parsing time within time zones. types The types library contains non-container utility types, like a C++11-compatible version of absl::optional.
  • 6.
    5 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 C++11 and Above Linux: gcc, clang: -std=c++11 gcc, clang: -std=c++14 clang < 5.0: -std=c++1z gcc, clang 5.0+: -std=c++17
  • 7.
    6 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 C++11 and Above Mac OS X: gcc, clang: -std=c++11 gcc, clang: -std=c++14 clang < 5.0: -std=c++1z gcc, clang 5.0+: -std=c++17
  • 8.
    7 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 C++11 and Above Windows: msvc /std:c++14 msvc /std:c++latest
  • 9.
    8 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Supported Platforms
  • 10.
    9 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Supported Platforms
  • 11.
    10 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Supported Platforms
  • 12.
    11 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 Supported Platforms
  • 13.
    12 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 LINKS Abseil https://abseil.io CppCon 2017: Titus Winters “C++ as a "Live at Head" Language” https://www.youtube.com/watch?v=tISy7EJQPzI
  • 14.
    13 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 GET STARTED!
  • 15.
    14 C++ COREHARD AUTUMN2017 IGOR SADCHENKO // C++ COREHARD // 14.10.17 THANKS!