Does boost provide a portable way to create a system::error_code object based on the last error? I don't see an obvious way to do this via the documentation unless I'm just overlooking it. There's lots of ways to create uninitialized error code objects, or error code objects initialized to a specific value, but I don't see an obvious portable way of determining "why the last operation failed".
Anyone encountered this before?