Skip to content

Commit

Permalink
Fix compatibility with Boost 1.74+
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Feb 3, 2023
1 parent 3ca89c7 commit e7df727
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/testBmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e7df727

Please sign in to comment.