![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Holds an int64_t value and behaves as an int64_t by exposing assignment, unary, comparison, and arithmetic operators.
The template parameter StrongIntegerName defines the name for the int type and must be unique within a binary (the convenient DEFINE_STRONG_INTEGER_TYPE macro at the start of the file generates a unique StrongIntegerName).
This class is NOT thread-safe.
Definition at line 192 of file strong_integers.h.
#include <strong_integers.h>
Public Types | |
| typedef int64_t | ValueType |
| typedef StrongInt64< StrongIntegerName > | ThisType |
Public Member Functions | |
| struct | ABSL_DEPRECATED ("Use absl::Hash instead") Hasher |
| constexpr | StrongInt64 () |
| constexpr | StrongInt64 (int64_t value) |
| NOLINTBEGIN(google-explicit-constructor) | |
| StrongInt64 & | operator= (int64_t arg_value) |
| NOLINTEND(google-explicit-constructor) | |
| constexpr int64_t | value () const |
| int64_t * | mutable_value () |
| template<typename ValType> | |
| constexpr ValType | value () const |
| constexpr ThisType | operator+ () const |
| constexpr ThisType | operator- () const |
| constexpr ThisType | operator~ () const |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t,+=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t, -=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t, *=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t,/=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t,<<=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t, > >=) | |
| STRONG_ASSIGNMENT_OP (StrongInt64, int64_t, %=) | |
Static Public Member Functions | |
| static constexpr absl::string_view | TypeName () |
Public Attributes | |
| INCREMENT_AND_DECREMENT_OPERATORS | |
| typedef StrongInt64<StrongIntegerName> operations_research::StrongInt64< StrongIntegerName >::ThisType |
Definition at line 195 of file strong_integers.h.
| typedef int64_t operations_research::StrongInt64< StrongIntegerName >::ValueType |
Definition at line 194 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 207 of file strong_integers.h.
|
inlineconstexpr |
NOLINTBEGIN(google-explicit-constructor)
Definition at line 210 of file strong_integers.h.
|
inline |
Definition at line 197 of file strong_integers.h.
|
inline |
Definition at line 219 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 228 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 229 of file strong_integers.h.
|
inline |
NOLINTEND(google-explicit-constructor)
Definition at line 213 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 230 of file strong_integers.h.
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| % | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| * | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| - | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| >= | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| + | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| / | ) |
| operations_research::StrongInt64< StrongIntegerName >::STRONG_ASSIGNMENT_OP | ( | StrongInt64< StrongIntegerName > | , |
| int64_t | , | ||
| << | ) |
|
inlinestaticconstexpr |
Definition at line 197 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 218 of file strong_integers.h.
|
inlineconstexpr |
Definition at line 222 of file strong_integers.h.
| operations_research::StrongInt64< StrongIntegerName >::INCREMENT_AND_DECREMENT_OPERATORS |
Definition at line 226 of file strong_integers.h.