The standard doesn't declare this overload as noexcept, but doesn't either say that it strictly cannot be noexcept either. The function doesn't throw on errors that are signaled via error_code, but the standard says that it may throw a bad_alloc.
This fixes an error with libstdc++ on linux.