---
title: llarp::uint128_t
summary: 128-bit unsigned integer. 

---

# llarp::uint128_t



128-bit unsigned integer.  [More...](#detailed-description)


`#include <uint128.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| constexpr | **[uint128_t](Classes/structllarp_1_1uint128__t.md#function-uint128-t)**() |
| constexpr | **[uint128_t](Classes/structllarp_1_1uint128__t.md#function-uint128-t)**(uint64_t lower) |
| constexpr | **[uint128_t](Classes/structllarp_1_1uint128__t.md#function-uint128-t)**(uint64_t upper, uint64_t lower) |
| constexpr | **[uint128_t](Classes/structllarp_1_1uint128__t.md#function-uint128-t)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & ) =default |
| constexpr | **[uint128_t](Classes/structllarp_1_1uint128__t.md#function-uint128-t)**([uint128_t](Classes/structllarp_1_1uint128__t.md) && ) =default |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator=](Classes/structllarp_1_1uint128__t.md#function-operator=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & ) =default |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator=](Classes/structllarp_1_1uint128__t.md#function-operator=)**([uint128_t](Classes/structllarp_1_1uint128__t.md) && ) =default |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator&=](Classes/structllarp_1_1uint128__t.md#function-operator&=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator&](Classes/structllarp_1_1uint128__t.md#function-operator&)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator|=](Classes/structllarp_1_1uint128__t.md#function-operator|=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator|](Classes/structllarp_1_1uint128__t.md#function-operator|)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator^=](Classes/structllarp_1_1uint128__t.md#function-operator^=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator^](Classes/structllarp_1_1uint128__t.md#function-operator^)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & o) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator~](Classes/structllarp_1_1uint128__t.md#function-operator~)**() const |
| constexpr | **[operator bool](Classes/structllarp_1_1uint128__t.md#function-operator-bool)**() const |
| constexpr | **[operator uint8_t](Classes/structllarp_1_1uint128__t.md#function-operator-uint8-t)**() const |
| constexpr | **[operator uint16_t](Classes/structllarp_1_1uint128__t.md#function-operator-uint16-t)**() const |
| constexpr | **[operator uint32_t](Classes/structllarp_1_1uint128__t.md#function-operator-uint32-t)**() const |
| constexpr | **[operator uint64_t](Classes/structllarp_1_1uint128__t.md#function-operator-uint64-t)**() const |
| constexpr bool | **[operator==](Classes/structllarp_1_1uint128__t.md#function-operator==)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr bool | **[operator!=](Classes/structllarp_1_1uint128__t.md#function-operator!=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr bool | **[operator<](Classes/structllarp_1_1uint128__t.md#function-operator<)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr bool | **[operator<=](Classes/structllarp_1_1uint128__t.md#function-operator<=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr bool | **[operator>](Classes/structllarp_1_1uint128__t.md#function-operator>)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr bool | **[operator>=](Classes/structllarp_1_1uint128__t.md#function-operator>=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator++](Classes/structllarp_1_1uint128__t.md#function-operator++)**() |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator++](Classes/structllarp_1_1uint128__t.md#function-operator++)**(int ) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator+=](Classes/structllarp_1_1uint128__t.md#function-operator+=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator+](Classes/structllarp_1_1uint128__t.md#function-operator+)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator-=](Classes/structllarp_1_1uint128__t.md#function-operator-=)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator-](Classes/structllarp_1_1uint128__t.md#function-operator-)**(const [uint128_t](Classes/structllarp_1_1uint128__t.md) & b) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator<<=](Classes/structllarp_1_1uint128__t.md#function-operator<<=)**(uint64_t shift) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator<<](Classes/structllarp_1_1uint128__t.md#function-operator<<)**(uint64_t shift) const |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) & | **[operator>>=](Classes/structllarp_1_1uint128__t.md#function-operator>>=)**(uint64_t shift) |
| constexpr [uint128_t](Classes/structllarp_1_1uint128__t.md) | **[operator>>](Classes/structllarp_1_1uint128__t.md#function-operator>>)**(uint64_t shift) const |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| uint64_t | **[lower](Classes/structllarp_1_1uint128__t.md#variable-lower)**  |
| uint64_t | **[upper](Classes/structllarp_1_1uint128__t.md#variable-upper)**  |

## Detailed Description

```cpp
struct llarp::uint128_t;
```

128-bit unsigned integer. 

Does _not_ support multiplication/division/modulus. 

## Public Functions Documentation

### function uint128_t

```cpp
inline constexpr uint128_t()
```


### function uint128_t

```cpp
inline constexpr uint128_t(
    uint64_t lower
)
```


### function uint128_t

```cpp
inline constexpr uint128_t(
    uint64_t upper,
    uint64_t lower
)
```


### function uint128_t

```cpp
constexpr uint128_t(
    const uint128_t & 
) =default
```


### function uint128_t

```cpp
constexpr uint128_t(
    uint128_t && 
) =default
```


### function operator=

```cpp
constexpr uint128_t & operator=(
    const uint128_t & 
) =default
```


### function operator=

```cpp
constexpr uint128_t & operator=(
    uint128_t && 
) =default
```


### function operator&=

```cpp
inline constexpr uint128_t & operator&=(
    const uint128_t & o
)
```


### function operator&

```cpp
inline constexpr uint128_t operator&(
    const uint128_t & o
) const
```


### function operator|=

```cpp
inline constexpr uint128_t & operator|=(
    const uint128_t & o
)
```


### function operator|

```cpp
inline constexpr uint128_t operator|(
    const uint128_t & o
) const
```


### function operator^=

```cpp
inline constexpr uint128_t & operator^=(
    const uint128_t & o
)
```


### function operator^

```cpp
inline constexpr uint128_t operator^(
    const uint128_t & o
) const
```


### function operator~

```cpp
inline constexpr uint128_t operator~() const
```


### function operator bool

```cpp
inline explicit constexpr operator bool() const
```


### function operator uint8_t

```cpp
inline explicit constexpr operator uint8_t() const
```


### function operator uint16_t

```cpp
inline explicit constexpr operator uint16_t() const
```


### function operator uint32_t

```cpp
inline explicit constexpr operator uint32_t() const
```


### function operator uint64_t

```cpp
inline explicit constexpr operator uint64_t() const
```


### function operator==

```cpp
inline constexpr bool operator==(
    const uint128_t & b
) const
```


### function operator!=

```cpp
inline constexpr bool operator!=(
    const uint128_t & b
) const
```


### function operator<

```cpp
inline constexpr bool operator<(
    const uint128_t & b
) const
```


### function operator<=

```cpp
inline constexpr bool operator<=(
    const uint128_t & b
) const
```


### function operator>

```cpp
inline constexpr bool operator>(
    const uint128_t & b
) const
```


### function operator>=

```cpp
inline constexpr bool operator>=(
    const uint128_t & b
) const
```


### function operator++

```cpp
inline constexpr uint128_t & operator++()
```


### function operator++

```cpp
inline constexpr uint128_t operator++(
    int 
)
```


### function operator+=

```cpp
inline constexpr uint128_t & operator+=(
    const uint128_t & b
)
```


### function operator+

```cpp
inline constexpr uint128_t operator+(
    const uint128_t & b
) const
```


### function operator-=

```cpp
inline constexpr uint128_t & operator-=(
    const uint128_t & b
)
```


### function operator-

```cpp
inline constexpr uint128_t operator-(
    const uint128_t & b
) const
```


### function operator<<=

```cpp
inline constexpr uint128_t & operator<<=(
    uint64_t shift
)
```


### function operator<<

```cpp
inline constexpr uint128_t operator<<(
    uint64_t shift
) const
```


### function operator>>=

```cpp
inline constexpr uint128_t & operator>>=(
    uint64_t shift
)
```


### function operator>>

```cpp
inline constexpr uint128_t operator>>(
    uint64_t shift
) const
```


## Public Attributes Documentation

### variable lower

```cpp
uint64_t lower;
```


### variable upper

```cpp
uint64_t upper;
```


-------------------------------

Updated on 2022-10-25 at 00:38:15 +0000