v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::base::internal::NarrowingRange< Dst, Src, Bounds > Struct Template Reference

#include <safe_conversions_impl.h>

Collaboration diagram for v8::base::internal::NarrowingRange< Dst, Src, Bounds >:

Public Types

using SrcLimits = std::numeric_limits<Src>
 
using DstLimits = std::numeric_limits<Dst>
 

Static Public Member Functions

template<typename T >
requires (std::same_as<T, Dst> && ((std::integral<T> && kShift < DstLimits::digits) || (std::floating_point<T> && kShift == 0)))
static constexpr T Adjust (T value)
 
static constexpr Dst max ()
 
static constexpr Dst lowest ()
 

Static Public Attributes

static constexpr int kShift
 

Detailed Description

template<typename Dst, typename Src, template< typename > class Bounds>
struct v8::base::internal::NarrowingRange< Dst, Src, Bounds >

Definition at line 188 of file safe_conversions_impl.h.

Member Typedef Documentation

◆ DstLimits

template<typename Dst , typename Src , template< typename > class Bounds>
using v8::base::internal::NarrowingRange< Dst, Src, Bounds >::DstLimits = std::numeric_limits<Dst>

Definition at line 190 of file safe_conversions_impl.h.

◆ SrcLimits

template<typename Dst , typename Src , template< typename > class Bounds>
using v8::base::internal::NarrowingRange< Dst, Src, Bounds >::SrcLimits = std::numeric_limits<Src>

Definition at line 189 of file safe_conversions_impl.h.

Member Function Documentation

◆ Adjust()

template<typename Dst , typename Src , template< typename > class Bounds>
template<typename T >
requires (std::same_as<T, Dst> && ((std::integral<T> && kShift < DstLimits::digits) || (std::floating_point<T> && kShift == 0)))
static constexpr T v8::base::internal::NarrowingRange< Dst, Src, Bounds >::Adjust ( T value)
inlinestaticconstexpr

Definition at line 204 of file safe_conversions_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowest()

template<typename Dst , typename Src , template< typename > class Bounds>
static constexpr Dst v8::base::internal::NarrowingRange< Dst, Src, Bounds >::lowest ( )
inlinestaticconstexpr

Definition at line 217 of file safe_conversions_impl.h.

Here is the call graph for this function:

◆ max()

template<typename Dst , typename Src , template< typename > class Bounds>
static constexpr Dst v8::base::internal::NarrowingRange< Dst, Src, Bounds >::max ( )
inlinestaticconstexpr

Definition at line 216 of file safe_conversions_impl.h.

Here is the call graph for this function:

Member Data Documentation

◆ kShift

template<typename Dst , typename Src , template< typename > class Bounds>
int v8::base::internal::NarrowingRange< Dst, Src, Bounds >::kShift
staticconstexpr
Initial value:
SrcLimits::digits < DstLimits::digits)
? (DstLimits::digits - SrcLimits::digits)
: 0

Definition at line 193 of file safe_conversions_impl.h.


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