HomePhabricator

introduce CharNotInt8 and BasicByte C++20 concepts

Description

introduce CharNotInt8 and BasicByte C++20 concepts

Summary:
This allows removing some Bitcoin ABC specific code and is a dependency for future backports.

We also get better compiler error messages and support for serializing std::byte C++style arrays as a side effect.

refactor: Print verbose serialize compiler error messages

https://github.com/bitcoin/bitcoin/pull/28423/commits/37e2b011136ca1cf00dfb9e575d12f0d035a6a2c
https://github.com/bitcoin/bitcoin/pull/29056/commits/fa898e6836a8fc2c7b6c8c15ad21818b16a89863

Allow std::byte C-style array serialization

https://github.com/bitcoin/bitcoin/pull/29056/commits/fae526345de539ab8f9b80100f6dfbe8e1d3284b

serialization: replace char-is-int8_t autoconf detection with c++20 concept

https://github.com/bitcoin/bitcoin/pull/29484/commits/ad7584d8b60119ca3717117a1eb6a16d753c5d74

This is a backport of core#29056 and core#29484
With also one commit from core#28423

Depends on D19039

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>Authored on Dec 11 2023, 21:33
PiRKCommitted on Thu, Dec 4, 15:05
PiRKPushed on Thu, Dec 4, 15:05
Reviewer
Restricted Project
Differential Revision
D19040: introduce CharNotInt8 and BasicByte C++20 concepts
Parents
rABC11b7c5ed0da8: crypto: make ChaCha20::SetKey wipe buffer
Branches
Unknown
Tags
Unknown