Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 681 Bytes

IsClass.md

File metadata and controls

29 lines (23 loc) · 681 Bytes

<CppML/TypeTraits/IsClass.hpp>

IsClass

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

IsClass<Pipe>

Than IsClass<Pipe> is a metafunction that passes to Pipe an ml::Bool<isClass>, where isClass is a bool marking whether T is a class type. Pipe defaults to ml::Identity.

f::  T -> ml::Bool<isClass> <-> Pipe

Example

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