// Copyright (c) 2026 Progmasoft. // SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-2.0 #pragma once #include #include namespace Progmasoft::Catch3::Detail { /// std::remove_cvref_t, which C++17 does not have. template using RemoveCvRef = std::remove_cv_t>; /// std::identity, which C++17 does not have. struct Identity final { template [[nodiscard]] constexpr Type && operator()(Type &&value) const noexcept { return std::forward(value); } }; /// An integral type that holds numbers, so anything but bool. template inline constexpr bool kIsInteger = std::is_integral_v && !std::is_same_v, bool>; /// Limits a function template to the types of kIsInteger. template using EnableIfInteger = std::enable_if_t, int>; template inline constexpr bool kIsEqualityComparable = false; template inline constexpr bool kIsEqualityComparable< Type, std::enable_if_t< std::is_convertible_v() == std::declval()), bool>>> = true; } // namespace Progmasoft::Catch3::Detail