FuncSketch
Loading...
Searching...
No Matches
func_sketch::math::AcceptableTypes< Types > Struct Template Reference

Traits struct to handle acceptable number types. More...

#include <func_sketch/math/acceptable_types.h>

Collaboration diagram for func_sketch::math::AcceptableTypes< Types >:

Public Types

template<typename ReceivedType>
using SelectTypeToUse
 Select a type to use from the list of acceptable types.

Detailed Description

template<typename... Types>
struct func_sketch::math::AcceptableTypes< Types >

Traits struct to handle acceptable number types.

Template Parameters
TypesTypes to accept.

Definition at line 86 of file acceptable_types.h.

Member Typedef Documentation

◆ SelectTypeToUse

template<typename... Types>
template<typename ReceivedType>
using func_sketch::math::AcceptableTypes< Types >::SelectTypeToUse
Initial value:
details::SelectTypeToUseImpl<ReceivedType, Types...>::Type
Internal implementation to select a type to use from a list of acceptable types.

Select a type to use from the list of acceptable types.

Template Parameters
ReceivedTypeType of the received argument.
Note
This type alias becomes the first type in the list of acceptable types that can be used to convert a number of the received type without loss of information. Actual check is done by std::is_same_v<CommonType<ReceivedType, AcceptableType>, AcceptableType>.
This type alias becomes func_sketch::math::NoAcceptableType if there is no acceptable type.
A number is given to a function after converting to the type selected using this type alias.

Definition at line 103 of file acceptable_types.h.


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