Loading...
Searching...
No Matches
Classes | Typedefs
TypeHelpers Namespace Reference

This namespace contains a few template classes for helping work out class type variations. More...

Classes

struct  ParameterType
 The ParameterType struct is used to find the best type to use when passing some kind of object as a parameter. More...
 
struct  UnsignedTypeWithSize
 These templates are designed to take an integer type, and return an unsigned int version with the same size. More...
 

Typedefs

template<typename Type >
using SmallestFloatType = std::conditional_t<std::is_same_v<Type, double>, double, float>
 These templates are designed to take a type, and if it's a double, they return a double type; for anything else, they return a float type.
 

Detailed Description

This namespace contains a few template classes for helping work out class type variations.

Typedef Documentation

◆ SmallestFloatType

template<typename Type >
using TypeHelpers::SmallestFloatType = std::conditional_t<std::is_same_v<Type, double>, double, float>

These templates are designed to take a type, and if it's a double, they return a double type; for anything else, they return a float type.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram