dxfio is a C++23 library that reads and writes AutoCAD DXF files: every release from R10 to R2018, ASCII and binary, read whole and saved back to the same release or to any other.
dxfio/dxfio.hpp brings in the whole interface, under the namespace DxfIO. This program makes a drawing with one line, saves it, and reads it back. Nothing throws: a load or a save that fails returns its Failure, with what went wrong and, for a load, on which line.
Each tutorial is the body of a main like this one. Every one is compiled with warnings as errors and run; its output is the one shown, and every file it writes reads back without an issue and passes the audit of AutoCAD 2026.