From 16d01cd77ff6d7c74984b97b6f9cb3f1a23cbf70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= <jgrad@icp.uni-stuttgart.de>
Date: Thu, 19 Jan 2023 19:11:05 +0100
Subject: [PATCH] core: Add support for Boost 1.81

(cherry-picked from commit c8b1123d9e823f8f62a7d84606c27e9456704d07)
[fix conflicts with catch ()]
---
 src/core/io/writer/h5md_core.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/io/writer/h5md_core.cpp b/src/core/io/writer/h5md_core.cpp
index bce29e0..864a93e 100644
--- a/src/core/io/writer/h5md_core.cpp
+++ b/src/core/io/writer/h5md_core.cpp
@@ -56,9 +56,9 @@ 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);
+    boost::filesystem::copy_file(pfrom, pto, option_fail_if_exists);
   } catch (const boost::filesystem::filesystem_error &e) {
     throw left_backupfile();
   }
-- 
2.49.1

