Abseil Blog

    Abseil Flags

    09 May 2019

    By Gennadiy Rozental, Abseil Engineer

    Abseil is very happy to announce the release of the Abseil Flags library. Abseil’s flags library provides a standard, readable way to pass command-line values to a program.

    #include <iostream>
    #include <string>
    #include "absl/flags/flag.h"
    #include "absl/flags/parse.h"
    ABSL_FLAG(std::string, name, "you", "Name of the person to greet");
    int main(int argc, char** argv) {
      absl::ParseCommandLine(argc, argv);
      std::cout << "Hello " << absl::GetFlag(FLAGS_name) << "!" << std::endl;
      return 0;
    $ greet
    Hello you!
    $ greet --name=Alice
    Hello Alice!

    Read more

    Abseil Support for CMake

    02 Apr 2019

    By Jon Cohen, Abseil Engineer

    CMake is a popular tool used to build multi-platform C++ projects. Abseil has had unofficial CMake support for some time, but support has never been as robust as that for Bazel. We are happy to announce that Abseil now fully supports the CMake build system.

    Read more

    Automated Upgrade Tooling for Abseil

    20 Dec 2018

    By Alex Strelnikov, Abseil Engineer

    As we promised when we released our Compatibility Guidelines, we have developed a process for announcing and handling any API-breaking changes we may need to make within the Abseil code base. Our C++ Automated Upgrade guide outlines this process, which consists of clang-tidy tooling and associated communication regarding the change. A list of all such tools will be listed on our Upgrade Tools page.

    At this time, we are also releasing our first such tool: a clang-tidy check for removing bug-prone implicit conversions in calls to several absl::Duration functions.

    Read more

    CppCon 2018: Modern C++ Design

    29 Nov 2018

    Titus Winters and Modern C++

    By Tom Manshreck, Abseil Tech Writer

    CppCon 2018 was held in Bellevue, WA at the end of September.

    C++ has changed a lot since the transformative introduction of C++11. It is now all too apparent that C++ API Design itself also needs to change as the lessons learned about, for example, type design become more understood.

    Titus Winters reflects on the changes to C++ and how the introduction of new principles such as move-only types have affected API design in this two-part talk.

    In the first part, Titus focuses on parameter passing and an API’s overload set in providing a powerful conceptual framework for API design. In the second part, we focus on the properties of well-designed types, and how to think about things like Regularity. We discuss how Regularity affects the design of non-owning reference types like string_view or span.

    If you haven’t already, check out Titus’ original blog post on “Revisiting Regular Types” for more background information.

    Read more

    Civil Time in Abseil

    10 Oct 2018

    By Greg Miller, Bradley White, and Shaindel Schwartz

    Almost every spring and fall there are news headlines about software that misbehaved during a daylight-saving transition. In much of the world, DST transitions occur multiple times per year, yet it is still a veritable minefield of latent bugs due to the complexities inherent in reasoning about civil-time discontinuities. To avoid these problems, a civil-time library must present the programmer with a correct — yet simplified — model that makes expressing the desired intent easy and writing bugs more obvious.

    To that end, we are very pleased to introduce a new feature for the Abseil time library — civil time support. This update adds a set of constructs and functions that are used to represent and perform computations with civil times.

    Read more

Subscribe to the Abseil Blog