Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
base::internal::StrictNumeric< T > Class Template Reference

#include <safe_conversions.h>

Public Types

using type = T
 

Public Member Functions

constexpr StrictNumeric ()
 
template<typename Src >
constexpr StrictNumeric (const StrictNumeric< Src > &rhs)
 
template<typename Src >
constexpr StrictNumeric (Src value)
 
template<typename Dst , typename std::enable_if< IsNumericRangeContained< Dst, T >::value >::type * = nullptr>
constexpr operator Dst () const
 

Detailed Description

template<typename T>
class base::internal::StrictNumeric< T >

Definition at line 270 of file safe_conversions.h.

Member Typedef Documentation

◆ type

template<typename T >
using base::internal::StrictNumeric< T >::type = T

Definition at line 272 of file safe_conversions.h.

Constructor & Destructor Documentation

◆ StrictNumeric() [1/3]

template<typename T >
constexpr base::internal::StrictNumeric< T >::StrictNumeric ( )
inlineconstexpr

Definition at line 274 of file safe_conversions.h.

274: value_(0) {}

◆ StrictNumeric() [2/3]

template<typename T >
template<typename Src >
constexpr base::internal::StrictNumeric< T >::StrictNumeric ( const StrictNumeric< Src > &  rhs)
inlineconstexpr

Definition at line 278 of file safe_conversions.h.

279 : value_(strict_cast<T>(rhs.value_)) {}

◆ StrictNumeric() [3/3]

template<typename T >
template<typename Src >
constexpr base::internal::StrictNumeric< T >::StrictNumeric ( Src  value)
inlineconstexpr

Definition at line 284 of file safe_conversions.h.

285 : value_(strict_cast<T>(value)) {}

Member Function Documentation

◆ operator Dst()

template<typename T >
template<typename Dst , typename std::enable_if< IsNumericRangeContained< Dst, T >::value >::type * = nullptr>
constexpr base::internal::StrictNumeric< T >::operator Dst ( ) const
inlineconstexpr

Definition at line 302 of file safe_conversions.h.

302 {
303 return static_cast<typename ArithmeticOrUnderlyingEnum<Dst>::type>(value_);
304 }

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