From 3beccfb429863024166433e6585c4e97b6b7c762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 20 Sep 2019 23:28:19 +0200 Subject: [PATCH] Remove the no longer used is_unique type trait It was used in checking that types in TEMPLATE_TEST_CASE and friends were unique, but this was removed for v2.8.0 (#1628). Since there are no further uses of this trait, the simplest thing to do is to just remove it. Fixes #1757 --- include/internal/catch_test_registry.h | 1 - include/internal/catch_type_traits.hpp | 40 -------------------------- projects/CMakeLists.txt | 1 - 3 files changed, 42 deletions(-) delete mode 100644 include/internal/catch_type_traits.hpp diff --git a/include/internal/catch_test_registry.h b/include/internal/catch_test_registry.h index 97fe8d68..616c4a25 100644 --- a/include/internal/catch_test_registry.h +++ b/include/internal/catch_test_registry.h @@ -12,7 +12,6 @@ #include "catch_interfaces_testcase.h" #include "catch_compiler_capabilities.h" #include "catch_stringref.h" -#include "catch_type_traits.hpp" #include "catch_preprocessor.hpp" #include "catch_meta.hpp" diff --git a/include/internal/catch_type_traits.hpp b/include/internal/catch_type_traits.hpp deleted file mode 100644 index 8edb1ecf..00000000 --- a/include/internal/catch_type_traits.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Created by Jozef on 12/11/2018. - * Copyright 2017 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ - -#ifndef TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED -#define TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED - -#include - -namespace Catch{ - -#ifdef CATCH_CPP17_OR_GREATER - template - inline constexpr auto is_unique = std::true_type{}; - - template - inline constexpr auto is_unique = std::bool_constant< - (!std::is_same_v && ...) && is_unique - >{}; -#else - -template -struct is_unique : std::true_type{}; - -template -struct is_unique : std::integral_constant -::value - && is_unique::value - && is_unique::value ->{}; - -#endif -} - -#endif // TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index 0776ceeb..7105632b 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -192,7 +192,6 @@ set(INTERNAL_HEADERS ${HEADER_DIR}/internal/catch_to_string.hpp ${HEADER_DIR}/internal/catch_tostring.h ${HEADER_DIR}/internal/catch_totals.h - ${HEADER_DIR}/internal/catch_type_traits.hpp ${HEADER_DIR}/internal/catch_uncaught_exceptions.h ${HEADER_DIR}/internal/catch_user_interfaces.h ${HEADER_DIR}/internal/catch_version.h