Photo: RCookie · CC BY 4.0 · Wikimedia Commons
General Tech

C++26: The New Debugging Header

The C++26 standard library has introduced a new debugging header called <debug>. This header provides several new debugging tools and features, including a new `std::source_location` class, which allows developers to track the source code location of an expression or a statement. This class provides information such as file name, line number, and column number. Additionally, the new `std::format` library function has been extended to include a new placeholder for the source location. The header also includes the `std::debug` namespace, which contains various debugging functions and classes, such as `std::source_location` and `std::format`. The new debugging header is designed to make debugging easier and more efficient by providing a standardized way to access debugging information.

Read the full article at sandordargo.com →