sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::mpl::predicate::same_as< T > Struct Template Reference

Compile-time type predicate: true if the evaluated type is the same as T. More...

#include <mp_utils.hpp>

Public Member Functions

template<template< class... > class W, class X>
requires type_wrapper<W, X>
consteval bool operator() (W< X >) const
 

Detailed Description

template<class T>
struct sparrow::mpl::predicate::same_as< T >

Compile-time type predicate: true if the evaluated type is the same as T.

Example: static constexpr auto some_types = typelist<int, float>{} static constexpr auto same_as_int = same_as<int>{}; static_assert( any_of(some_types, same_as_int) == true); static_assert( all_of(some_types, same_as_int) == false);

Definition at line 206 of file mp_utils.hpp.

Member Function Documentation

◆ operator()()

template<class T>
template<template< class... > class W, class X>
requires type_wrapper<W, X>
bool sparrow::mpl::predicate::same_as< T >::operator() ( W< X > ) const
inlineconsteval

Definition at line 210 of file mp_utils.hpp.


The documentation for this struct was generated from the following file: