OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
TemplateUtils.h File Reference

Provides compile time evaluation utilities for templates and template packs. More...

Go to the source code of this file.

Classes

struct  ConstantValue< T, V >
 Compile-time constant value. More...
 
struct  GetPackElement< I, T, Ts >
 

Typedefs

template<bool V>
using BoolConstant = ConstantValue<bool, V>
 Compile-time constant boolean value.
 
using TrueType = BoolConstant<true>
 Constant True Value.
 
using FalseType = BoolConstant<false>
 Constant False Value.
 

Variables

template<typename T , typename... Ts>
constexpr bool IsUnique< T, Ts... > = BoolConstant<(!IsSame<T, Ts> && ...) && IsUnique<Ts...>>{}
 Check if all types in a template pack are unique.
 

Detailed Description

Provides compile time evaluation utilities for templates and template packs.

Typedef Documentation

◆ BoolConstant

template<bool V>
using BoolConstant = ConstantValue<bool, V>

Compile-time constant boolean value.

Template Parameters
VValue

Variable Documentation

◆ IsUnique< T, Ts... >

template<typename T , typename... Ts>
bool IsUnique< T, Ts... > = BoolConstant<(!IsSame<T, Ts> && ...) && IsUnique<Ts...>>{}
inlineconstexpr

Check if all types in a template pack are unique.

Template Parameters
TFirst element of template pack
TsRest of the template pack