24#ifndef VAL_INT_COMPARE_INCLUDED
25#define VAL_INT_COMPARE_INCLUDED
59 if (lhs_is_neg != rhs_is_neg)
64 return lhs.
val() < rhs.
val();
67 return std::less<ulonglong>()(lhs.
val(), rhs.
val());
73 if (lhs_is_neg != rhs_is_neg)
78 return lhs.
val() == rhs.
val();
82 return lhs < rhs || lhs == rhs;
Holds value/unsigned_flag for the result of val_int(), so that we can compare with operator<(),...
Definition: val_int_compare.h:36
const bool m_unsigned_flag
Definition: val_int_compare.h:53
constexpr longlong val() const
Definition: val_int_compare.h:41
constexpr bool is_negative() const
Definition: val_int_compare.h:49
ulonglong val_unsigned() const
Definition: val_int_compare.h:44
constexpr Integer_value(longlong val, bool unsigned_flag)
Definition: val_int_compare.h:38
constexpr bool is_unsigned() const
Definition: val_int_compare.h:42
const longlong m_val
Definition: val_int_compare.h:52
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
long long int longlong
Definition: my_inttypes.h:55
bool operator<=(const Integer_value &lhs, const Integer_value &rhs)
Definition: val_int_compare.h:81
bool operator==(const Integer_value &lhs, const Integer_value &rhs)
Definition: val_int_compare.h:70
bool operator<(const Integer_value &lhs, const Integer_value &rhs)
Definition: val_int_compare.h:56