From e7df7274fe0760b4f3910f7eb7cf73fa77649f73 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 3 Feb 2023 16:25:37 +0100 Subject: [PATCH] Fix compatibility with Boost 1.74+ --- tests/testBmp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/testBmp.cpp b/tests/testBmp.cpp index eb4e600..5eb3416 100644 --- a/tests/testBmp.cpp +++ b/tests/testBmp.cpp @@ -448,8 +448,14 @@ BOOST_AUTO_TEST_CASE(PaletteUsageOnWrite) // Non-paletted file is written as paletted because it now contains a palette // If the format is paletted, then the reference is already paletted -> other branch BOOST_TEST_REQUIRE(!testFilesEqual(outFilepath, outFilepathRef)); + constexpr auto overwrite_existing = +#if BOOST_VERSION >= 107400 + bfs::copy_options::overwrite_existing; +#else + bfs::copy_option::overwrite_if_exists; +#endif // Take the paletted as new reference - bfs::copy_file(outFilepath, outFilepathRef, bfs::copy_option::overwrite_if_exists); + bfs::copy_file(outFilepath, outFilepathRef, overwrite_existing); } else BOOST_TEST_REQUIRE(testFilesEqual(outFilepath, outFilepathRef)); // c) Passed palette is used unless file contains one (or may)