Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
type-decay.h
Go to the documentation of this file.
1// Copyright (c) The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef MP_PROXY_TYPE_DECAY_H
6#define MP_PROXY_TYPE_DECAY_H
7
8#include <mp/util.h>
9
10namespace mp {
11template <typename LocalType, typename Value, typename Output>
13 Priority<0>,
14 InvokeContext& invoke_context,
15 Value&& value,
16 Output&& output)
17{
18 BuildField(TypeList<LocalType>(), invoke_context, output, std::forward<Value>(value));
19}
20
21template <typename LocalType, typename Value, typename Output>
23{
24 BuildField(TypeList<LocalType>(), invoke_context, output, std::forward<Value>(value));
25}
26
27template <typename LocalType, typename Value, typename Output>
31 Value&& value,
32 Output&& output)
33{
34 BuildField(TypeList<LocalType>(), invoke_context, output, std::forward<Value>(value));
35}
36} // namespace mp
37
38#endif // MP_PROXY_TYPE_DECAY_H
Functions to serialize / deserialize common bitcoin types.
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Overload multiprocess library's CustomBuildField hook to allow any serializable object to be stored i...
Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous.
Definition util.h:109
Generic utility functions used by capnp code.
Definition util.h:33
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73