HomePhabricator

We assume uint8_t is an alias of unsigned char.

Description

We assume uint8_t is an alias of unsigned char.

Summary:
char, unsigned char, and std::byte (C++17) are the only byte types according to the C++ Standard.
byte type means a type that can be used to observe an object's value representation.
We use uint8_t everywhere to see bytes, so we have to ensure that uint8_t is an alias to a byte type.

References:
http://eel.is/c++draft/basic.types
http://eel.is/c++draft/basic.memobj#def:byte
http://eel.is/c++draft/expr.sizeof#1
http://eel.is/c++draft/cstdint#syn

Test Plan:

ninja check

Reviewers: Fabien, #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: Fabien, #bitcoin_abc, jasonbcox

Subscribers: markblundeberg, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4731

Details

Provenance
fpelliccioniAuthored on Dec 16 2019, 18:09
fpelliccioniPushed on Dec 17 2019, 19:08
Reviewer
Restricted Project
Differential Revision
D4731: We assume uint8_t is an alias of unsigned char.
Parents
rABC154c52dc3d70: Merge #14474: bitcoin-tx: Use constant for n pubkeys check
Branches
Unknown
Tags
Unknown