3 ms·
The hardest part of passing `std::string` to `printf` was getting the macro to convince the pre-standard-C++11 compiler that it was `constexpr` enough so that `
by o11c 2y ago
The hardest part of passing `std::string` to `printf` was getting the macro to convince the pre-standard-C++11 compiler that it was `constexpr` enough so that `-Werror=format` would work.
I found it was easiest to sometimes allocate a temporary, if the input wasn't known to be NUL-terminated.