OpenShot Audio Library | OpenShotAudio 0.4.0
|
Classes | |
struct | ParameterType |
struct | UnsignedTypeWithSize |
Typedefs | |
template<typename Type > | |
using | SmallestFloatType = std::conditional_t<std::is_same_v<Type, double>, double, float> |
This namespace contains a few template classes for helping work out class type variations.
struct juce::TypeHelpers::ParameterType |
The ParameterType struct is used to find the best type to use when passing some kind of object as a parameter.
Of course, this is only likely to be useful in certain esoteric template situations.
E.g. "myFunction (typename TypeHelpers::ParameterType<int>::type, typename TypeHelpers::ParameterType<MyObject>::type)" would evaluate to "myfunction (int, const MyObject&)", keeping any primitive types as pass-by-value, but passing objects as a const reference, to avoid copying.
Definition at line 752 of file juce_MathsFunctions.h.
Class Members | ||
---|---|---|
typedef const Type & | type const Type& |
struct juce::TypeHelpers::UnsignedTypeWithSize |
These templates are designed to take an integer type, and return an unsigned int version with the same size.
Definition at line 785 of file juce_MathsFunctions.h.
using juce::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.
Definition at line 778 of file juce_MathsFunctions.h.