The fixed size array of 32 bytes for storing 256-bit EVM values.
More...
#include <evmc.hpp>
|
constexpr | bytes32 (evmc_bytes32 init={}) noexcept |
| Default and converting constructor.
|
|
constexpr | bytes32 (uint64_t v) noexcept |
| Converting constructor from unsigned integer value.
|
|
constexpr | operator bool () const noexcept |
| Explicit operator converting to bool.
|
|
constexpr | operator bytes_view () const noexcept |
| Implicit operator converting to bytes_view.
|
|
|
uint8_t | bytes [32] |
| The 32 bytes.
|
|
The fixed size array of 32 bytes for storing 256-bit EVM values.
This type wraps C evmc_bytes32 to make sure objects of this type are always initialized.
Definition at line 70 of file evmc.hpp.
◆ bytes32() [1/2]
Default and converting constructor.
Initializes bytes to zeros if not other init
value provided.
Definition at line 75 of file evmc.hpp.
The fixed size array of 32 bytes.
◆ bytes32() [2/2]
constexpr evmc::bytes32::bytes32 |
( |
uint64_t |
v | ) |
|
|
inlineexplicitconstexprnoexcept |
Converting constructor from unsigned integer value.
This constructor assigns the v
value to the last 8 bytes [24:31] in big-endian order.
Definition at line 81 of file evmc.hpp.
83 0,
84 0,
85 0,
86 0,
87 0,
88 0,
89 0,
90 0,
91 0,
92 0,
93 0,
94 0,
95 0,
96 0,
97 0,
98 0,
99 0,
100 0,
101 0,
102 0,
103 0,
104 0,
105 0,
106 static_cast<uint8_t>(v >> 56),
107 static_cast<uint8_t>(v >> 48),
108 static_cast<uint8_t>(v >> 40),
109 static_cast<uint8_t>(v >> 32),
110 static_cast<uint8_t>(v >> 24),
111 static_cast<uint8_t>(v >> 16),
112 static_cast<uint8_t>(v >> 8),
113 static_cast<uint8_t>(v >> 0)}}
114 {}
◆ operator bool()
constexpr evmc::bytes32::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Explicit operator converting to bool.
Definition at line 274 of file evmc.hpp.
275{
277}
constexpr bool is_zero(const address &a) noexcept
Checks if the given address is the zero address.
◆ operator bytes_view()
constexpr evmc::bytes32::operator bytes_view |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Implicit operator converting to bytes_view.
Definition at line 120 of file evmc.hpp.
uint8_t bytes[32]
The 32 bytes.
The documentation for this struct was generated from the following file: