Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::std_util::impl Namespace Reference

Functions

template<typename ToType, typename FromType, typename ReportPolicy = ReportPolicyIgnore>
ToType conversionImpl (FromType from)
 Safely convert between two different integral types. If the value stored in from cannot be represented in ToType, the value is truncated.

Function Documentation

◆ conversionImpl()

template<typename ToType, typename FromType, typename ReportPolicy = ReportPolicyIgnore>
ToType sen::std_util::impl::conversionImpl ( FromType from)

Safely convert between two different integral types. If the value stored in from cannot be represented in ToType, the value is truncated.

Template Parameters
ToTypeoutput type
FromTypeinput type
ReportPolicypolicy type that specifies how truncation should be reported
Parameters
[in]fromvalue that should be converted to ToType
Returns
from value represented as ToType, possibly truncated within the range of ToType