From fac515d145ad6f1c40a46ff6a4b3aadfa23a2933 Mon Sep 17 00:00:00 2001 From: "kodiakhq[bot]" <49736102+kodiakhq[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 10:58:12 +0000 Subject: [PATCH] Fix build on Boost 1.81 (#4655) Description of changes: - Replace file copy option that was deprecated in Boost 1.81 --- src/core/io/writer/h5md_core.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/io/writer/h5md_core.cpp b/src/core/io/writer/h5md_core.cpp index 41ab8a7b988..6e4d7571b17 100644 --- a/src/core/io/writer/h5md_core.cpp +++ b/src/core/io/writer/h5md_core.cpp @@ -56,10 +56,10 @@ static void backup_file(const std::string &from, const std::string &to) { * have gone wrong. */ boost::filesystem::path pfrom(from), pto(to); + auto constexpr option_fail_if_exists = boost::filesystem::copy_options::none; try { - boost::filesystem::copy_file( - pfrom, pto, boost::filesystem::copy_option::fail_if_exists); - } catch (const boost::filesystem::filesystem_error &e) { + boost::filesystem::copy_file(pfrom, pto, option_fail_if_exists); + } catch (const boost::filesystem::filesystem_error &) { throw left_backupfile(); } }