#pragma once #include "fwd.h" #include #include namespace NYT { /// @cond Doxygen_Suppress //////////////////////////////////////////////////////////////////////////////// template struct TIsBaseOf { static constexpr bool Value = std::is_base_of_v && !std::is_same_v; }; //////////////////////////////////////////////////////////////////////////////// namespace NDetail { template struct TIndexInTuple; template struct TIndexInTuple> { static constexpr int Value = 0; }; template struct TIndexInTuple> { static constexpr int Value = 0; }; template struct TIndexInTuple> { static constexpr int Value = 1 + TIndexInTuple>::Value; }; template constexpr bool DoesTupleContainType = (TIndexInTuple::Value < std::tuple_size{}); template > struct TUniqueTypes; template struct TUniqueTypes, std::tuple> { using TType = std::conditional_t< DoesTupleContainType>, typename TUniqueTypes, std::tuple>::TType, typename TUniqueTypes, std::tuple>::TType >; }; template struct TUniqueTypes> { using TType = TOut; }; } // namespace NDetail /// @endcond Doxygen_Suppress //////////////////////////////////////////////////////////////////////////////// }