Here's the starting point for WG14 (not yet standardized): https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3889.htm

This is coming with C standard library changes to do what you ask. So those might be absorbed into C++ in due time, and you get what you ask for.