Upgrade to C++17

This commit is contained in:
Chris Thrasher
2025-09-21 13:23:25 -06:00
parent c6cefc6596
commit db46dc4cb2
93 changed files with 431 additions and 917 deletions

View File

@@ -83,12 +83,12 @@ namespace {
} // end unnamed namespace
static_assert( std::is_constructible<Catch::Detail::unique_ptr<base>,
Catch::Detail::unique_ptr<derived>>::value, "Upcasting is supported");
static_assert(!std::is_constructible<Catch::Detail::unique_ptr<derived>,
Catch::Detail::unique_ptr<base>>::value, "Downcasting is not supported");
static_assert(!std::is_constructible<Catch::Detail::unique_ptr<base>,
Catch::Detail::unique_ptr<unrelated>>::value, "Cannot just convert one ptr type to another");
static_assert( std::is_constructible_v<Catch::Detail::unique_ptr<base>,
Catch::Detail::unique_ptr<derived>>, "Upcasting is supported");
static_assert(!std::is_constructible_v<Catch::Detail::unique_ptr<derived>,
Catch::Detail::unique_ptr<base>>, "Downcasting is not supported");
static_assert(!std::is_constructible_v<Catch::Detail::unique_ptr<base>,
Catch::Detail::unique_ptr<unrelated>>, "Cannot just convert one ptr type to another");
TEST_CASE("Upcasting special member functions", "[internals][unique-ptr]") {
using Catch::Detail::unique_ptr;