![]() |
Bitcoin Core
29.1.0
P2P Digital Currency
|
""_hex is a compile-time user-defined literal returning a std::array<std::byte>, equivalent to ParseHex().
More...
Functions | |
| template<util::detail::Hex str> | |
| constexpr auto | operator""_hex () |
| template<util::detail::Hex str> | |
| constexpr auto | operator""_hex_u8 () |
| template<util::detail::Hex str> | |
| constexpr auto | operator""_hex_v () |
| template<util::detail::Hex str> | |
| auto | operator""_hex_v_u8 () |
""_hex is a compile-time user-defined literal returning a std::array<std::byte>, equivalent to ParseHex().
Variants provided:
std::vector<std::byte>, useful for heap allocation or variable-length serialization.std::array<uint8_t>, for cases where std::byte is incompatible.std::vector<uint8_t>, combining heap allocation with uint8_t.uint8_t variants when not necessary, as the codebase migrates to use std::byte instead of unsigned char and uint8_t.std::array instead of std::vector like ParseHex() does is because heap-based containers cannot cross the compile- time/runtime barrier. | constexpr auto util::hex_literals::operator""_hex | ( | ) |
Definition at line 430 of file strencodings.h.
| constexpr auto util::hex_literals::operator""_hex_u8 | ( | ) |
Definition at line 433 of file strencodings.h.
| constexpr auto util::hex_literals::operator""_hex_v | ( | ) |
Definition at line 436 of file strencodings.h.
|
inline |
1.8.14