3 ms·
If errno is such a big problem, what's the hope in even running the C++ standard library and its std::error_code... No way to use magic macros there.
by mgaunard 3y ago
If errno is such a big problem, what's the hope in even running the C++ standard library and its std::error_code...
No way to use magic macros there.
- foota 3y agoThe issue _was_ the magic macros, I believe. Normally, the macros expand to a constant, but now they don't, which breaks some things. std::error_code doesn't have the same issue, since it's not a constant?
- mgaunard 3y agoWell if they need to replace those integer constants with function calls, clearly that breaks everything. std::error_code is just a wrapper for several different enums. I should have probably just given the posix one, std::errc. You can't just make the various enumerations of an enum be function calls. The right implementation would have been to convert error codes from/to posix, rather than just give native error codes and make looking up the reference value a runtime operation.