Explore how to modernize an old C++ codebase by transitioning from printf-style to std::print-style logging using clang-tidy in this 44-minute conference talk. Learn about the journey from non-macro wrappers for printf to libfmt's fmt::printf, then to fmt::print, and potentially to C++23's std::print. Discover the challenges faced during this process, including the development of a custom clang-tidy check based on Clang 17's modernize-use-std-print. Gain insights into the benefits of each transition step and how similar approaches could facilitate future migrations to standard logging libraries like spdlog. Ideal for C++ developers interested in codebase modernization, this talk provides practical tips for leveraging clang-tidy to automate tedious refactoring tasks, even without extensive LLVM or Clang expertise.
Overview
Syllabus
Building on clang-tidy to Move From printf-style to std::print-style Logging and Beyond - Mike Crowe
Taught by
cpponsea