A library that provides basic, platform-agnostic C++ utilities

Clone this repo:

Branches

  1. 4cbe33c files: change parameter of GetDirectoryName() to be a const-ref by Thiago Farina · 3 days ago master
  2. 2364f14 Adding inttypes.h to BUILD.gn by Ross Wang · 7 days ago
  3. 3d3a976 Adding warning on ftl::TimePoint. by Benjamin Lerman · 12 days ago
  4. 05e652f Add more scope information to the FTL readme by Adam Barth · 3 weeks ago
  5. e7eea62 Add CancelableCallback class template by Arman Uguray · 4 weeks ago

Fuchsia Template Library

A library containing basic C++ building blocks, such as logging and reference counting.

This library builds for both host (this includes Linux, Windows, and macOS) as well as target (i.e., Fuchsia) platforms and is not source or binary stable. On both host and target, we build with C++14.

Should I put my thing in FTL?

In an ideal world, FTL wouldn‘t exist and we could use the C++ standard library’s building blocks. Unfortunately, the C++ standard library is missing some important functionality (e.g., logging) and makes some design choices we disagree with (e.g., sizeof(std::shared_ptr) == 2*sizeof(void*), std::chrono lacking a defined scalar representation). FTL exists to fill in those gaps in the standard library.

It‘s easy for these types of libraries to accrete a large amount of code because they’re convenient places to share code. We‘d like to keep FTL small and focused on the problem of “fixing” the C++ standard library, which means you probably shouldn’t put your thing in FTL unless it is related to a particular deficiency of the C++ standard library.

If you look at the library, you‘ll see we haven’t quite lived up to this ideal, but hope springs eternal.

What currently exists in FTL that should be moved out?

Most, if not all, of the code in files should be split out into its own library. That code is already in a separate namespace to make that move easier in the future.