ManaPlus
Namespaces | Data Structures | Typedefs | Functions
mse Namespace Reference

Namespaces

 mstd
 

Data Structures

class  msevector_range_error
 
class  msevector_null_dereference_error
 
class  msev_pointer
 
struct  integral_constant
 
struct  _mse_Is_iterator
 
class  msevector
 
class  primitives_range_error
 
class  CBool
 
class  TIntBase1
 
class  CInt
 
class  CSize_t
 

Typedefs

typedef size_t msev_size_t
 
typedef long int msev_int
 
typedef bool msev_bool
 
typedef size_t msev_as_a_size_t
 
template<typename _InIter >
using _mse_RequireInputIter = typename std::enable_if< std::is_convertible< typename std::iterator_traits< _InIter >::iterator_category, std::input_iterator_tag >::value >::type
 

Functions

template<typename _TDestination , typename _TSource >
constexpr static bool sg_can_exceed_upper_bound ()
 
template<typename _TDestination , typename _TSource >
constexpr static bool sg_can_exceed_lower_bound ()
 
template<typename _TDestination , typename _TSource >
void g_assign_check_range (const _TSource &x)
 
static size_t as_a_size_t (CSize_t n)
 
CInt operator+ (size_t lhs, const CInt &rhs)
 
CSize_t operator+ (size_t lhs, const CSize_t &rhs)
 
CInt operator+ (int lhs, const CInt &rhs)
 
CInt operator+ (int lhs, const CSize_t &rhs)
 
CInt operator+ (const CInt &lhs, const CSize_t &rhs)
 
CInt operator- (size_t lhs, const CInt &rhs)
 
CInt operator- (size_t lhs, const CSize_t &rhs)
 
CInt operator- (int lhs, const CInt &rhs)
 
CInt operator- (int lhs, const CSize_t &rhs)
 
CInt operator- (const CInt &lhs, const CSize_t &rhs)
 
CInt operator* (size_t lhs, const CInt &rhs)
 
CSize_t operator* (size_t lhs, const CSize_t &rhs)
 
CInt operator* (int lhs, const CInt &rhs)
 
CInt operator* (int lhs, const CSize_t &rhs)
 
CInt operator* (const CInt &lhs, const CSize_t &rhs)
 
CInt operator/ (size_t lhs, const CInt &rhs)
 
CSize_t operator/ (size_t lhs, const CSize_t &rhs)
 
CInt operator/ (int lhs, const CInt &rhs)
 
CInt operator/ (int lhs, const CSize_t &rhs)
 
CInt operator/ (const CInt &lhs, const CSize_t &rhs)
 
bool operator< (size_t lhs, const CInt &rhs)
 
bool operator< (size_t lhs, const CSize_t &rhs)
 
bool operator< (int lhs, const CInt &rhs)
 
bool operator< (int lhs, const CSize_t &rhs)
 
bool operator< (long long lhs, const CInt &rhs)
 
bool operator< (long long lhs, const CSize_t &rhs)
 
bool operator< (const CInt &lhs, const CSize_t &rhs)
 
bool operator> (size_t lhs, const CInt &rhs)
 
bool operator> (size_t lhs, const CSize_t &rhs)
 
bool operator> (int lhs, const CInt &rhs)
 
bool operator> (int lhs, const CSize_t &rhs)
 
bool operator> (long long lhs, const CInt &rhs)
 
bool operator> (long long lhs, const CSize_t &rhs)
 
bool operator> (const CInt &lhs, const CSize_t &rhs)
 
bool operator<= (size_t lhs, const CInt &rhs)
 
bool operator<= (size_t lhs, const CSize_t &rhs)
 
bool operator<= (int lhs, const CInt &rhs)
 
bool operator<= (int lhs, const CSize_t &rhs)
 
bool operator<= (long long lhs, const CInt &rhs)
 
bool operator<= (long long lhs, const CSize_t &rhs)
 
bool operator<= (const CInt &lhs, const CSize_t &rhs)
 
bool operator>= (size_t lhs, const CInt &rhs)
 
bool operator>= (size_t lhs, const CSize_t &rhs)
 
bool operator>= (int lhs, const CInt &rhs)
 
bool operator>= (int lhs, const CSize_t &rhs)
 
bool operator>= (long long lhs, const CInt &rhs)
 
bool operator>= (long long lhs, const CSize_t &rhs)
 
bool operator>= (const CInt &lhs, const CSize_t &rhs)
 
bool operator== (size_t lhs, const CInt &rhs)
 
bool operator== (size_t lhs, const CSize_t &rhs)
 
bool operator== (int lhs, const CInt &rhs)
 
bool operator== (int lhs, const CSize_t &rhs)
 
bool operator== (long long lhs, const CInt &rhs)
 
bool operator== (long long lhs, const CSize_t &rhs)
 
bool operator== (const CInt &lhs, const CSize_t &rhs)
 
bool operator!= (size_t lhs, const CInt &rhs)
 
bool operator!= (size_t lhs, const CSize_t &rhs)
 
bool operator!= (int lhs, const CInt &rhs)
 
bool operator!= (int lhs, const CSize_t &rhs)
 
bool operator!= (long long lhs, const CInt &rhs)
 
bool operator!= (long long lhs, const CSize_t &rhs)
 
bool operator!= (const CInt &lhs, const CSize_t &rhs)
 
static void s_type_test1 ()
 

Typedef Documentation

◆ _mse_RequireInputIter

template<typename _InIter >
using mse::_mse_RequireInputIter = typedef typename std::enable_if< std::is_convertible<typename std::iterator_traits<_InIter>::iterator_category, std::input_iterator_tag>::value >::type

Definition at line 137 of file msemsevector.h.

◆ msev_as_a_size_t

typedef size_t mse::msev_as_a_size_t

Definition at line 64 of file msemsevector.h.

◆ msev_bool

typedef bool mse::msev_bool

Definition at line 63 of file msemsevector.h.

◆ msev_int

typedef long int mse::msev_int

Definition at line 62 of file msemsevector.h.

◆ msev_size_t

typedef size_t mse::msev_size_t

Definition at line 61 of file msemsevector.h.

Function Documentation

◆ as_a_size_t()

size_t mse::as_a_size_t ( CSize_t  n)
static

Definition at line 672 of file mseprimitives.h.

672 { n.assert_initialized(); return n.m_val; }

Referenced by operator!=(), operator*(), operator+(), operator-(), operator/(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

◆ g_assign_check_range()

template<typename _TDestination , typename _TSource >
void mse::g_assign_check_range ( const _TSource &  x)

Definition at line 149 of file mseprimitives.h.

149  {
150 #ifndef MSE_PRIMITIVE_ASSIGN_RANGE_CHECK_DISABLED
151  /* This probably needs to be cleaned up. But at the moment this should be mostly compile time complexity. And
152  as is it avoids "signed/unsigned" mismatch warnings. */
153  MSE_CONSTEXPR const bool rhs_can_exceed_upper_bound = sg_can_exceed_upper_bound<_TDestination, _TSource>();
154  MSE_CONSTEXPR const bool rhs_can_exceed_lower_bound = sg_can_exceed_lower_bound<_TDestination, _TSource>();
155  MSE_CONSTEXPR const bool can_exceed_bounds = rhs_can_exceed_upper_bound || rhs_can_exceed_lower_bound;
156  if (can_exceed_bounds) {
157  if (rhs_can_exceed_upper_bound) {
158  if (x > _TSource(std::numeric_limits<_TDestination>::max())) {
159  MSE_THROW(primitives_range_error("range error - value to be assigned is out of range of the target (integer) type"));
160  }
161  }
162  if (rhs_can_exceed_lower_bound) {
163  /* We're assuming that std::numeric_limits<>::lowest() will never be greater than zero. */
164  if (0 > x) {
165  if (0 == std::numeric_limits<_TDestination>::lowest()) {
166  MSE_THROW(primitives_range_error("range error - value to be assigned is out of range of the target (integer) type"));
167  }
168  else if (x < _TSource(std::numeric_limits<_TDestination>::lowest())) {
169  MSE_THROW(primitives_range_error("range error - value to be assigned is out of range of the target (integer) type"));
170  }
171  }
172  }
173  }
174 #endif // !MSE_PRIMITIVE_ASSIGN_RANGE_CHECK_DISABLED
175  }
#define MSE_THROW(x)
Definition: mseprimitives.h:58
#define MSE_CONSTEXPR
Definition: mseprimitives.h:42

References MSE_CONSTEXPR, MSE_THROW, and x.

◆ operator!=() [1/7]

bool mse::operator!= ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 813 of file mseprimitives.h.

813 { rhs.assert_initialized(); return lhs != as_a_size_t(rhs); }
static size_t as_a_size_t(CSize_t n)

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [2/7]

bool mse::operator!= ( int  lhs,
const CInt rhs 
)
inline

Definition at line 809 of file mseprimitives.h.

809 { rhs.assert_initialized(); return CInt(lhs) != rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [3/7]

bool mse::operator!= ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 810 of file mseprimitives.h.

810 { rhs.assert_initialized(); return CInt(lhs) != as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [4/7]

bool mse::operator!= ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 811 of file mseprimitives.h.

811 { rhs.assert_initialized(); return CInt(lhs) != rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [5/7]

bool mse::operator!= ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 812 of file mseprimitives.h.

812 { rhs.assert_initialized(); return CInt(lhs) != as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [6/7]

bool mse::operator!= ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 807 of file mseprimitives.h.

807 { rhs.assert_initialized(); return CSize_t(lhs) != rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator!=() [7/7]

bool mse::operator!= ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 808 of file mseprimitives.h.

808 { rhs.assert_initialized(); return CSize_t(lhs) != rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator*() [1/5]

CInt mse::operator* ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 765 of file mseprimitives.h.

765 { rhs.assert_initialized(); return lhs * as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator*() [2/5]

CInt mse::operator* ( int  lhs,
const CInt rhs 
)
inline

Definition at line 763 of file mseprimitives.h.

763 { rhs.assert_initialized(); return CInt(lhs) * rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator*() [3/5]

CInt mse::operator* ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 764 of file mseprimitives.h.

764 { rhs.assert_initialized(); return CInt(lhs) * as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator*() [4/5]

CInt mse::operator* ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 761 of file mseprimitives.h.

761 { rhs.assert_initialized(); return CSize_t(lhs) * rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator*() [5/5]

CSize_t mse::operator* ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 762 of file mseprimitives.h.

762 { rhs.assert_initialized(); return CSize_t(lhs) * rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator+() [1/5]

CInt mse::operator+ ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 755 of file mseprimitives.h.

755 { rhs.assert_initialized(); return lhs + as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator+() [2/5]

CInt mse::operator+ ( int  lhs,
const CInt rhs 
)
inline

Definition at line 753 of file mseprimitives.h.

753 { rhs.assert_initialized(); return CInt(lhs) + rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator+() [3/5]

CInt mse::operator+ ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 754 of file mseprimitives.h.

754 { rhs.assert_initialized(); return CInt(lhs) + as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator+() [4/5]

CInt mse::operator+ ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 751 of file mseprimitives.h.

751 { rhs.assert_initialized(); rhs.assert_initialized(); return CSize_t(lhs) + rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator+() [5/5]

CSize_t mse::operator+ ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 752 of file mseprimitives.h.

752 { rhs.assert_initialized(); return CSize_t(lhs) + rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator-() [1/5]

CInt mse::operator- ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 760 of file mseprimitives.h.

760 { rhs.assert_initialized(); return lhs - as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator-() [2/5]

CInt mse::operator- ( int  lhs,
const CInt rhs 
)
inline

Definition at line 758 of file mseprimitives.h.

758 { rhs.assert_initialized(); return CInt(lhs) - rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator-() [3/5]

CInt mse::operator- ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 759 of file mseprimitives.h.

759 { rhs.assert_initialized(); return CInt(lhs) - as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator-() [4/5]

CInt mse::operator- ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 756 of file mseprimitives.h.

756 { rhs.assert_initialized(); return CSize_t(lhs) - rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator-() [5/5]

CInt mse::operator- ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 757 of file mseprimitives.h.

757 { rhs.assert_initialized(); return CSize_t(lhs) - rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator/() [1/5]

CInt mse::operator/ ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 770 of file mseprimitives.h.

770 { rhs.assert_initialized(); return lhs / as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator/() [2/5]

CInt mse::operator/ ( int  lhs,
const CInt rhs 
)
inline

Definition at line 768 of file mseprimitives.h.

768 { rhs.assert_initialized(); return CInt(lhs) / rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator/() [3/5]

CInt mse::operator/ ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 769 of file mseprimitives.h.

769 { rhs.assert_initialized(); return CInt(lhs) / as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator/() [4/5]

CInt mse::operator/ ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 766 of file mseprimitives.h.

766 { rhs.assert_initialized(); return CSize_t(lhs) / rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator/() [5/5]

CSize_t mse::operator/ ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 767 of file mseprimitives.h.

767 { rhs.assert_initialized(); return CSize_t(lhs) / rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [1/7]

bool mse::operator< ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 778 of file mseprimitives.h.

778 { rhs.assert_initialized(); return lhs < as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [2/7]

bool mse::operator< ( int  lhs,
const CInt rhs 
)
inline

Definition at line 774 of file mseprimitives.h.

774 { rhs.assert_initialized(); return CInt(lhs) < rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [3/7]

bool mse::operator< ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 775 of file mseprimitives.h.

775 { rhs.assert_initialized(); return CInt(lhs) < as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [4/7]

bool mse::operator< ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 776 of file mseprimitives.h.

776 { rhs.assert_initialized(); return CInt(lhs) < rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [5/7]

bool mse::operator< ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 777 of file mseprimitives.h.

777 { rhs.assert_initialized(); return CInt(lhs) < as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [6/7]

bool mse::operator< ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 772 of file mseprimitives.h.

772 { rhs.assert_initialized(); return CSize_t(lhs) < rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<() [7/7]

bool mse::operator< ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 773 of file mseprimitives.h.

773 { rhs.assert_initialized(); return CSize_t(lhs) < rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [1/7]

bool mse::operator<= ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 792 of file mseprimitives.h.

792 { rhs.assert_initialized(); return lhs <= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [2/7]

bool mse::operator<= ( int  lhs,
const CInt rhs 
)
inline

Definition at line 788 of file mseprimitives.h.

788 { rhs.assert_initialized(); return CInt(lhs) <= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [3/7]

bool mse::operator<= ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 789 of file mseprimitives.h.

789 { rhs.assert_initialized(); return CInt(lhs) <= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [4/7]

bool mse::operator<= ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 790 of file mseprimitives.h.

790 { rhs.assert_initialized(); return CInt(lhs) <= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [5/7]

bool mse::operator<= ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 791 of file mseprimitives.h.

791 { rhs.assert_initialized(); return CInt(lhs) <= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [6/7]

bool mse::operator<= ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 786 of file mseprimitives.h.

786 { rhs.assert_initialized(); return CSize_t(lhs) <= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator<=() [7/7]

bool mse::operator<= ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 787 of file mseprimitives.h.

787 { rhs.assert_initialized(); return CSize_t(lhs) <= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [1/7]

bool mse::operator== ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 806 of file mseprimitives.h.

806 { rhs.assert_initialized(); return lhs == as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [2/7]

bool mse::operator== ( int  lhs,
const CInt rhs 
)
inline

Definition at line 802 of file mseprimitives.h.

802 { rhs.assert_initialized(); return CInt(lhs) == rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [3/7]

bool mse::operator== ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 803 of file mseprimitives.h.

803 { rhs.assert_initialized(); return CInt(lhs) == as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [4/7]

bool mse::operator== ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 804 of file mseprimitives.h.

804 { rhs.assert_initialized(); return CInt(lhs) == rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [5/7]

bool mse::operator== ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 805 of file mseprimitives.h.

805 { rhs.assert_initialized(); return CInt(lhs) == as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [6/7]

bool mse::operator== ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 800 of file mseprimitives.h.

800 { rhs.assert_initialized(); return CSize_t(lhs) == rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator==() [7/7]

bool mse::operator== ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 801 of file mseprimitives.h.

801 { rhs.assert_initialized(); return CSize_t(lhs) == rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [1/7]

bool mse::operator> ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 785 of file mseprimitives.h.

785 { rhs.assert_initialized(); return lhs > as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [2/7]

bool mse::operator> ( int  lhs,
const CInt rhs 
)
inline

Definition at line 781 of file mseprimitives.h.

781 { rhs.assert_initialized(); return CInt(lhs) > rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [3/7]

bool mse::operator> ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 782 of file mseprimitives.h.

782 { rhs.assert_initialized(); return CInt(lhs) > as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [4/7]

bool mse::operator> ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 783 of file mseprimitives.h.

783 { rhs.assert_initialized(); return CInt(lhs) > rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [5/7]

bool mse::operator> ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 784 of file mseprimitives.h.

784 { rhs.assert_initialized(); return CInt(lhs) > as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [6/7]

bool mse::operator> ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 779 of file mseprimitives.h.

779 { rhs.assert_initialized(); return CSize_t(lhs) > rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>() [7/7]

bool mse::operator> ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 780 of file mseprimitives.h.

780 { rhs.assert_initialized(); return CSize_t(lhs) > rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [1/7]

bool mse::operator>= ( const CInt lhs,
const CSize_t rhs 
)
inline

Definition at line 799 of file mseprimitives.h.

799 { rhs.assert_initialized(); return lhs >= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [2/7]

bool mse::operator>= ( int  lhs,
const CInt rhs 
)
inline

Definition at line 795 of file mseprimitives.h.

795 { rhs.assert_initialized(); return CInt(lhs) >= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [3/7]

bool mse::operator>= ( int  lhs,
const CSize_t rhs 
)
inline

Definition at line 796 of file mseprimitives.h.

796 { rhs.assert_initialized(); return CInt(lhs) >= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [4/7]

bool mse::operator>= ( long long  lhs,
const CInt rhs 
)
inline

Definition at line 797 of file mseprimitives.h.

797 { rhs.assert_initialized(); return CInt(lhs) >= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [5/7]

bool mse::operator>= ( long long  lhs,
const CSize_t rhs 
)
inline

Definition at line 798 of file mseprimitives.h.

798 { rhs.assert_initialized(); return CInt(lhs) >= as_a_size_t(rhs); }

References as_a_size_t(), and mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [6/7]

bool mse::operator>= ( size_t  lhs,
const CInt rhs 
)
inline

Definition at line 793 of file mseprimitives.h.

793 { rhs.assert_initialized(); return CSize_t(lhs) >= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ operator>=() [7/7]

bool mse::operator>= ( size_t  lhs,
const CSize_t rhs 
)
inline

Definition at line 794 of file mseprimitives.h.

794 { rhs.assert_initialized(); return CSize_t(lhs) >= rhs; }

References mse::TIntBase1< _Ty >::assert_initialized().

◆ s_type_test1()

static void mse::s_type_test1 ( )
static

Definition at line 816 of file mseprimitives.h.

816  {
817 #ifdef MSE_SELF_TESTS
818  CInt i1(3);
819  CInt i2 = 5;
820  CInt i3;
821  i3 = 7;
822  CInt i4 = i1 + i2;
823  i4 = i1 + 17;
824  i4 = 19 + i1;
825  i4 += i2;
826  i4 -= 23;
827  i4++;
828  CBool b1 = (i1 < i2);
829  b1 = (i1 < 17);
830  b1 = (19 < i1);
831  b1 = (i1 == i2);
832  b1 = (i1 == 17);
833  b1 = (19 == i1);
834 
835  CSize_t szt1(3);
836  CSize_t szt2 = 5;
837  CSize_t szt3;
838  szt3 = 7;
839  CSize_t szt4 = szt1 + szt2;
840  szt4 = szt1 + 17;
841  szt4 = 19 + szt1;
842  CInt i11 = 19 + szt1;
843  szt4 += szt2;
844  szt4 -= 23;
845  szt4++;
846 #ifndef MSVC2010_COMPATIBLE
847  size_t szt5 = size_t(szt4);
848 #endif /*MSVC2010_COMPATIBLE*/
849  bool b3 = (szt1 < szt2);
850  b3 = (szt1 < 17);
851  b3 = (19 < szt1);
852  CBool b2 = (19 < szt1);
853  b3 = (szt1 == szt2);
854  b3 = (szt1 == 17);
855  b3 = (19 == szt1);
856  CBool b4 = (b1 < b2);
857  b4 = (b1 == b2);
858  b4 = (b1 > b3);
859  b4 = (b3 >= b1);
860  b4 = (b3 == b1);
861  b4 = (b1 && b2);
862  b4 = (b1 || b3);
863  b4 = (b3 && b1);
864  b4 |= b1;
865  b4 &= b3;
866 #endif // MSE_SELF_TESTS
867  }

◆ sg_can_exceed_lower_bound()

template<typename _TDestination , typename _TSource >
constexpr static bool mse::sg_can_exceed_lower_bound ( )
staticconstexpr

Definition at line 141 of file mseprimitives.h.

141  {
142  return (
143  (std::numeric_limits<_TSource>::is_signed && (!std::numeric_limits<_TDestination>::is_signed))
144  || (std::numeric_limits<_TSource>::is_signed && (std::numeric_limits<_TSource>::digits > std::numeric_limits<_TDestination>::digits))
145  );
146  }

◆ sg_can_exceed_upper_bound()

template<typename _TDestination , typename _TSource >
constexpr static bool mse::sg_can_exceed_upper_bound ( )
staticconstexpr

Definition at line 129 of file mseprimitives.h.

129  {
130  return (
131  ((std::numeric_limits<_TSource>::is_signed == std::numeric_limits<_TDestination>::is_signed)
132  && (std::numeric_limits<_TSource>::digits > std::numeric_limits<_TDestination>::digits))
133  || ((std::numeric_limits<_TSource>::is_signed != std::numeric_limits<_TDestination>::is_signed)
134  && ((std::numeric_limits<_TSource>::is_signed && (std::numeric_limits<_TSource>::digits > (1 + std::numeric_limits<_TDestination>::digits)))
135  || ((!std::numeric_limits<_TSource>::is_signed) && ((1 + std::numeric_limits<_TSource>::digits) > std::numeric_limits<_TDestination>::digits))
136  )
137  )
138  );
139  }