Skip to content

Commit

Permalink
add default hex formats for size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Nov 3, 2024
1 parent a8fba6b commit 1ef358e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Encoding.hh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ constexpr const char* printf_hex_format_for_type<uint64_t>() { return PRIX64; }
template <>
constexpr const char* printf_hex_format_for_type<int64_t>() { return PRIX64; }

template <>
constexpr const char* printf_hex_format_for_type<size_t>() { return "zX"; }
template <>
constexpr const char* printf_hex_format_for_type<ssize_t>() { return "zX"; }

template <typename ResultT, typename SrcT>
ResultT sign_extend(SrcT src) {
using UResultT = std::make_unsigned_t<ResultT>;
Expand Down

0 comments on commit 1ef358e

Please sign in to comment.