//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This file contains the definition of various metaprogramming helpers and /// support utilities for the math test framework. /// //===----------------------------------------------------------------------===// #ifndef MATHTEST_SUPPORT_HPP #define MATHTEST_SUPPORT_HPP #include #include #include #include namespace mathtest { //===----------------------------------------------------------------------===// // Function & Type Traits //===----------------------------------------------------------------------===// namespace detail { template struct FunctionTraitsImpl; template struct FunctionTraitsImpl { using ReturnType = RetType; using ArgTypesTuple = std::tuple; }; template struct FunctionTraitsImpl : FunctionTraitsImpl {}; template struct FunctionTraitsImpl : FunctionTraitsImpl {}; } // namespace detail template using FunctionTraits = detail::FunctionTraitsImpl< std::remove_pointer_t>>; template using FunctionTypeTraits = detail::FunctionTraitsImpl; template struct TypeIdentityOf { using type = T; }; template class Template> struct ApplyTupleTypes; template