std::filesystem::remove throws std::filesystem_error when file is locked
Problem Context The standard specifies that std::filesystem::remove throws std::filesystem_error when the removal fails. For a non‑existent path the error code is error_code::not_found, but for a file that is locked by another process the error code is implementation‑defined. The exception message derives from error_code::message(), which is system‑dependent