clang 24.0.0git
clang::OptionalUnsigned< T > Struct Template Reference

#include "clang/Basic/OptionalUnsigned.h"

Inheritance diagram for clang::OptionalUnsigned< T >:
[legend]

Public Types

using underlying_type

Public Member Functions

constexpr OptionalUnsigned (std::nullopt_t)
 OptionalUnsigned (T Val)
template<class U, std::enable_if_t< std::is_signed_v< U >, bool > = false>
 OptionalUnsigned (U)=delete
constexpr underlying_type toInternalRepresentation () const
constexpr bool has_value () const
constexpr operator bool () const
T operator* () const
T value_or (T Def) const

Static Public Member Functions

static constexpr OptionalUnsigned fromInternalRepresentation (underlying_type Rep)

Friends

constexpr bool operator== (OptionalUnsigned LHS, OptionalUnsigned RHS)
constexpr bool operator!= (OptionalUnsigned LHS, OptionalUnsigned RHS)
constexpr bool operator< (OptionalUnsigned LHS, OptionalUnsigned RHS)
constexpr bool operator<= (OptionalUnsigned LHS, OptionalUnsigned RHS)
constexpr bool operator>= (OptionalUnsigned LHS, OptionalUnsigned RHS)
constexpr bool operator> (OptionalUnsigned LHS, OptionalUnsigned RHS)

Detailed Description

template<class T>
struct clang::OptionalUnsigned< T >

Definition at line 23 of file OptionalUnsigned.h.

Member Typedef Documentation

◆ underlying_type

template<class T>
using clang::OptionalUnsigned< T >::underlying_type
Initial value:
typename std::conditional_t<std::is_enum_v<T>, std::underlying_type<T>,
llvm::type_identity<T>>::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.

Definition at line 24 of file OptionalUnsigned.h.

Constructor & Destructor Documentation

◆ OptionalUnsigned() [1/3]

template<class T>
clang::OptionalUnsigned< T >::OptionalUnsigned ( std::nullopt_t )
inlineconstexpr

Definition at line 29 of file OptionalUnsigned.h.

◆ OptionalUnsigned() [2/3]

template<class T>
clang::OptionalUnsigned< T >::OptionalUnsigned ( T Val)
inline

Definition at line 30 of file OptionalUnsigned.h.

◆ OptionalUnsigned() [3/3]

template<class T>
template<class U, std::enable_if_t< std::is_signed_v< U >, bool > = false>
clang::OptionalUnsigned< T >::OptionalUnsigned ( U )
delete

Member Function Documentation

◆ fromInternalRepresentation()

template<class T>
constexpr OptionalUnsigned clang::OptionalUnsigned< T >::fromInternalRepresentation ( underlying_type Rep)
inlinestaticconstexpr

Definition at line 38 of file OptionalUnsigned.h.

◆ has_value()

◆ operator bool()

template<class T>
clang::OptionalUnsigned< T >::operator bool ( ) const
inlineexplicitconstexpr

Definition at line 45 of file OptionalUnsigned.h.

◆ operator*()

template<class T>
T clang::OptionalUnsigned< T >::operator* ( ) const
inline

Definition at line 46 of file OptionalUnsigned.h.

Referenced by clang::OptionalUnsigned< unsigned >::value_or().

◆ toInternalRepresentation()

template<class T>
underlying_type clang::OptionalUnsigned< T >::toInternalRepresentation ( ) const
inlineconstexpr

◆ value_or()

template<class T>
T clang::OptionalUnsigned< T >::value_or ( T Def) const
inline

Definition at line 51 of file OptionalUnsigned.h.

◆ operator!=

template<class T>
bool operator!= ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 56 of file OptionalUnsigned.h.

◆ operator<

template<class T>
bool operator< ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 60 of file OptionalUnsigned.h.

◆ operator<=

template<class T>
bool operator<= ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 63 of file OptionalUnsigned.h.

◆ operator==

template<class T>
bool operator== ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 53 of file OptionalUnsigned.h.

◆ operator>

template<class T>
bool operator> ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 69 of file OptionalUnsigned.h.

◆ operator>=

template<class T>
bool operator>= ( OptionalUnsigned< T > LHS,
OptionalUnsigned< T > RHS )
friend

Definition at line 66 of file OptionalUnsigned.h.


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