Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy > Class Template Reference

#include <qcheckedint_impl.h>

+ Inheritance diagram for QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >:
+ Collaboration diagram for QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >:

Public Types

template<typename AInt>
using if_is_same_int = std::enable_if_t<std::is_same_v<Int, AInt>, bool>
 

Public Member Functions

 QCheckedInt ()=default
 
constexpr QCheckedInt (Int i) noexcept
 
constexpr operator Int () const noexcept
 
constexpr Int value () const noexcept
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr void setValue (AInt i) noexcept
 
constexpr Intas_underlying () &noexcept
 
constexpr const Intas_underlying () const &noexcept
 
constexpr Int && as_underlying () &&noexcept
 
constexpr const Int && as_underlying () const &&noexcept
 
constexpr QCheckedInt operator+ () const noexcept
 
constexpr QCheckedInt operator- () const
 
constexpr QCheckedIntoperator++ ()
 
constexpr QCheckedInt operator++ (int)
 
constexpr QCheckedIntoperator-- ()
 
constexpr QCheckedInt operator-- (int)
 
constexpr QCheckedIntoperator+= (QCheckedInt other)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedIntoperator+= (AInt other)
 
constexpr QCheckedIntoperator-= (QCheckedInt other)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedIntoperator-= (AInt other)
 
constexpr QCheckedIntoperator*= (QCheckedInt other)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedIntoperator*= (AInt other)
 
constexpr QCheckedIntoperator/= (QCheckedInt other)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedIntoperator/= (AInt other)
 

Friends

constexpr QCheckedInt operator+ (QCheckedInt lhs, QCheckedInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator+ (QCheckedInt lhs, AInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator+ (AInt lhs, QCheckedInt rhs)
 
constexpr QCheckedInt operator- (QCheckedInt lhs, QCheckedInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator- (QCheckedInt lhs, AInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator- (AInt lhs, QCheckedInt rhs)
 
constexpr QCheckedInt operator* (QCheckedInt lhs, QCheckedInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator* (QCheckedInt lhs, AInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator* (AInt lhs, QCheckedInt rhs)
 
constexpr QCheckedInt operator/ (QCheckedInt lhs, QCheckedInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator/ (QCheckedInt lhs, AInt rhs)
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr QCheckedInt operator/ (AInt lhs, QCheckedInt rhs)
 
constexpr bool comparesEqual (QCheckedInt lhs, QCheckedInt rhs) noexcept
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr bool comparesEqual (QCheckedInt lhs, AInt rhs) noexcept
 
constexpr Qt::strong_ordering compareThreeWay (QCheckedInt lhs, QCheckedInt rhs) noexcept
 
template<typename AInt, if_is_same_int< AInt > = true>
constexpr Qt::strong_ordering compareThreeWay (QCheckedInt lhs, AInt rhs) noexcept
 

Detailed Description

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
class QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >

Definition at line 76 of file qcheckedint_impl.h.

Member Typedef Documentation

◆ if_is_same_int

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt>
using QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::if_is_same_int = std::enable_if_t<std::is_same_v<Int, AInt>, bool>

Definition at line 85 of file qcheckedint_impl.h.

Constructor & Destructor Documentation

◆ QCheckedInt() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::QCheckedInt ( )
default

◆ QCheckedInt() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::QCheckedInt ( Int i)
inlineexplicitconstexprnoexcept

Definition at line 89 of file qcheckedint_impl.h.

Member Function Documentation

◆ as_underlying() [1/4]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
Int && QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::as_underlying ( ) &&
inlineconstexprnoexcept

Definition at line 106 of file qcheckedint_impl.h.

◆ as_underlying() [2/4]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
Int & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::as_underlying ( ) &
inlineconstexprnoexcept

Definition at line 104 of file qcheckedint_impl.h.

◆ as_underlying() [3/4]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
const Int && QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::as_underlying ( ) const &&
inlineconstexprnoexcept

Definition at line 107 of file qcheckedint_impl.h.

◆ as_underlying() [4/4]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
const Int & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::as_underlying ( ) const &
inlineconstexprnoexcept

Definition at line 105 of file qcheckedint_impl.h.

◆ operator Int()

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator Int ( ) const
inlineexplicitconstexprnoexcept

Definition at line 94 of file qcheckedint_impl.h.

◆ operator*=() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator*= ( AInt other)
inlineconstexpr

Definition at line 238 of file qcheckedint_impl.h.

◆ operator*=() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator*= ( QCheckedInt< Int, Impl, FailureReportPolicy > other)
inlineconstexpr

Definition at line 232 of file qcheckedint_impl.h.

◆ operator+()

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator+ ( ) const
inlineconstexprnoexcept

Definition at line 110 of file qcheckedint_impl.h.

◆ operator++() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator++ ( )
inlineconstexpr

Definition at line 119 of file qcheckedint_impl.h.

◆ operator++() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator++ ( int )
inlineconstexpr

Definition at line 126 of file qcheckedint_impl.h.

◆ operator+=() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator+= ( AInt other)
inlineconstexpr

Definition at line 174 of file qcheckedint_impl.h.

◆ operator+=() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator+= ( QCheckedInt< Int, Impl, FailureReportPolicy > other)
inlineconstexpr

Definition at line 168 of file qcheckedint_impl.h.

◆ operator-()

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator- ( ) const
inlineconstexpr

Definition at line 111 of file qcheckedint_impl.h.

◆ operator--() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator-- ( )
inlineconstexpr

Definition at line 133 of file qcheckedint_impl.h.

◆ operator--() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator-- ( int )
inlineconstexpr

Definition at line 140 of file qcheckedint_impl.h.

◆ operator-=() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator-= ( AInt other)
inlineconstexpr

Definition at line 206 of file qcheckedint_impl.h.

◆ operator-=() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator-= ( QCheckedInt< Int, Impl, FailureReportPolicy > other)
inlineconstexpr

Definition at line 200 of file qcheckedint_impl.h.

◆ operator/=() [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator/= ( AInt other)
inlineconstexpr

Definition at line 270 of file qcheckedint_impl.h.

◆ operator/=() [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt & QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::operator/= ( QCheckedInt< Int, Impl, FailureReportPolicy > other)
inlineconstexpr

Definition at line 264 of file qcheckedint_impl.h.

◆ setValue()

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
void QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::setValue ( AInt i)
inlineconstexprnoexcept

Definition at line 102 of file qcheckedint_impl.h.

◆ value()

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
Int QtPrivate::QCheckedIntegers::QCheckedInt< Int, Impl, FailureReportPolicy >::value ( ) const
inlineconstexprnoexcept

Definition at line 100 of file qcheckedint_impl.h.

Friends And Related Symbol Documentation

◆ comparesEqual [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
bool comparesEqual ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 284 of file qcheckedint_impl.h.

◆ comparesEqual [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
bool comparesEqual ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 278 of file qcheckedint_impl.h.

◆ compareThreeWay [1/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
Qt::strong_ordering compareThreeWay ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 295 of file qcheckedint_impl.h.

◆ compareThreeWay [2/2]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
Qt::strong_ordering compareThreeWay ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 289 of file qcheckedint_impl.h.

◆ operator* [1/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator* ( AInt lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 227 of file qcheckedint_impl.h.

◆ operator* [2/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator* ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 221 of file qcheckedint_impl.h.

◆ operator* [3/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt operator* ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 212 of file qcheckedint_impl.h.

◆ operator+ [1/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator+ ( AInt lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 163 of file qcheckedint_impl.h.

◆ operator+ [2/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator+ ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 157 of file qcheckedint_impl.h.

◆ operator+ [3/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt operator+ ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 148 of file qcheckedint_impl.h.

◆ operator- [1/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator- ( AInt lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 195 of file qcheckedint_impl.h.

◆ operator- [2/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator- ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 189 of file qcheckedint_impl.h.

◆ operator- [3/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt operator- ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 180 of file qcheckedint_impl.h.

◆ operator/ [1/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator/ ( AInt lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 259 of file qcheckedint_impl.h.

◆ operator/ [2/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
template<typename AInt, if_is_same_int< AInt > = true>
QCheckedInt operator/ ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
AInt rhs )
friend

Definition at line 253 of file qcheckedint_impl.h.

◆ operator/ [3/3]

template<typename Int, typename Impl = SafeCheckImpl<Int>, typename FailureReportPolicy = AssertReportPolicy>
QCheckedInt operator/ ( QCheckedInt< Int, Impl, FailureReportPolicy > lhs,
QCheckedInt< Int, Impl, FailureReportPolicy > rhs )
friend

Definition at line 244 of file qcheckedint_impl.h.


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