2 ms·
std::system_category and std::generic_category are generally the same on non-Windows platforms. std::system_category on Windows is any Windows error (HRESULT, G
by vlovich123 7y ago
std::system_category and std::generic_category are generally the same on non-Windows platforms. std::system_category on Windows is any Windows error (HRESULT, GetLastError, etc) and std::generic_category always represents errno.
So for cross-platform APIs that exist on both you'll generally use std::generic_category as the API is usually defined to modify errno in the case of an error. For Windows-only APIs use std::system_category.