LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::detail::CheckedInt Struct Reference

#include "llvm/ADT/Sequence.h"

Public Member Functions

bool operator== (const CheckedInt &O) const
 
bool operator!= (const CheckedInt &O) const
 
CheckedInt operator+ (intmax_t Offset) const
 
intmax_t operator- (CheckedInt Other) const
 
template<typename Integral , std::enable_if_t< std::is_integral< Integral >::value, bool > = 0>
Integral to () const
 
template<typename Enum , std::enable_if_t< std::is_enum< Enum >::value, bool > = 0>
Enum to () const
 

Static Public Member Functions

template<typename Integral , std::enable_if_t< std::is_integral< Integral >::value, bool > = 0>
static CheckedInt from (Integral FromValue)
 
template<typename Enum , std::enable_if_t< std::is_enum< Enum >::value, bool > = 0>
static CheckedInt from (Enum FromValue)
 

Detailed Description

Definition at line 126 of file Sequence.h.

Member Function Documentation

◆ from() [1/2]

template<typename Enum , std::enable_if_t< std::is_enum< Enum >::value, bool > = 0>
static CheckedInt llvm::detail::CheckedInt::from ( Enum  FromValue)
inlinestatic

Definition at line 141 of file Sequence.h.

◆ from() [2/2]

template<typename Integral , std::enable_if_t< std::is_integral< Integral >::value, bool > = 0>
static CheckedInt llvm::detail::CheckedInt::from ( Integral  FromValue)
inlinestatic

Definition at line 130 of file Sequence.h.

◆ operator!=()

bool llvm::detail::CheckedInt::operator!= ( const CheckedInt O) const
inline

Definition at line 148 of file Sequence.h.

◆ operator+()

CheckedInt llvm::detail::CheckedInt::operator+ ( intmax_t  Offset) const
inline

Definition at line 150 of file Sequence.h.

References llvm::AddOverflow(), and llvm::Offset.

◆ operator-()

intmax_t llvm::detail::CheckedInt::operator- ( CheckedInt  Other) const
inline

Definition at line 157 of file Sequence.h.

References llvm::Other, and llvm::SubOverflow().

◆ operator==()

bool llvm::detail::CheckedInt::operator== ( const CheckedInt O) const
inline

Definition at line 147 of file Sequence.h.

◆ to() [1/2]

template<typename Integral , std::enable_if_t< std::is_integral< Integral >::value, bool > = 0>
Integral llvm::detail::CheckedInt::to ( ) const
inline

◆ to() [2/2]

template<typename Enum , std::enable_if_t< std::is_enum< Enum >::value, bool > = 0>
Enum llvm::detail::CheckedInt::to ( ) const
inline

Definition at line 177 of file Sequence.h.


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