diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-10 19:56:22 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-10 20:54:33 +0200 |
commit | 0a8054e7cd5c76d01e4ac7234e3883d05f6f5fdd (patch) | |
tree | ff45a44e6f9bf3a76df3f5f23a80208b550d7a96 /doc/release-notes/release-notes-0.9.2.1.md | |
parent | a84b056d5f1bc28b08937af3485124e68bb93024 (diff) | |
parent | 818dc74ba2745872fd68d2158380fc8bd331210e (diff) | |
download | bitcoin-0a8054e7cd5c76d01e4ac7234e3883d05f6f5fdd.tar.xz |
Merge #12731: Support serialization as another type without casting
818dc74 Support serialization as another type without casting (Pieter Wuille)
Pull request description:
This adds a `READWRITEAS(type, obj)` macro which serializes `obj` as if it were converted to `const type&` when `const`, and to `type&` when non-`const`. No actual cast is involved, so this only works when this conversion can be done automatically.
This makes it usable in serialization code that uses a single implementation for both serialization and deserializing, which doesn't know the constness of the object involved.
This is a redo of #12712, using a slightly different interface.
Tree-SHA512: 262f0257284ff99b5ffaec9b997c194e221522ba35c3ac8eaa9bb344449d7ea0a314de254dc77449fa7aaa600f8cd9a24da65aade8c1ec6aa80c6e9a7bba5ca7
Diffstat (limited to 'doc/release-notes/release-notes-0.9.2.1.md')
0 files changed, 0 insertions, 0 deletions