Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 717 Bytes

IsSame.md

File metadata and controls

31 lines (24 loc) · 717 Bytes

<CppML/TypeTraits/IsSame.hpp>

IsSame

template <typename Pipe = ml::Identity>
struct IsSame {
template<typename T, typename U>
  using f = /* .... */;
};

IsSame<Pipe>

Than IsSame<Pipe> is a metafunction that passes to Pipe an ml::Bool<isSame>, where isSame is a bool marking whether T is the same type as U. Pipe defaults to ml::Identity.

f::  T, U -> ml::Bool<isSame> <-> Pipe

Example

using T = ml::f<
                ml::IsSame<>,
                int,
                double>;
static_assert( std::is_same_v<
                          T,
                          ml::Bool<false>>);