mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
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
This commit is contained in:
parent
af8b2538a6
commit
3beccfb429
@ -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"
|
||||
|
||||
|
@ -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 <type_traits>
|
||||
|
||||
namespace Catch{
|
||||
|
||||
#ifdef CATCH_CPP17_OR_GREATER
|
||||
template <typename...>
|
||||
inline constexpr auto is_unique = std::true_type{};
|
||||
|
||||
template <typename T, typename... Rest>
|
||||
inline constexpr auto is_unique<T, Rest...> = std::bool_constant<
|
||||
(!std::is_same_v<T, Rest> && ...) && is_unique<Rest...>
|
||||
>{};
|
||||
#else
|
||||
|
||||
template <typename...>
|
||||
struct is_unique : std::true_type{};
|
||||
|
||||
template <typename T0, typename T1, typename... Rest>
|
||||
struct is_unique<T0, T1, Rest...> : std::integral_constant
|
||||
<bool,
|
||||
!std::is_same<T0, T1>::value
|
||||
&& is_unique<T0, Rest...>::value
|
||||
&& is_unique<T1, Rest...>::value
|
||||
>{};
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user