Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 372 Bytes

Identity.md

File metadata and controls

28 lines (22 loc) · 372 Bytes

<CppML/Functional/Identity.hpp>

Identity

struct Identity {
  template <typename T>
  using f = /* .... */;
};

Identity

Identity evaluates to the type it was passed.

f:: T -> T

Example

using T = ml::f<
              ml::Identity,
              int>;
static_assert(
        std::is_same_v<
              int, T>);