Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
concepts.hpp
Go to the documentation of this file.
1#pragma once
2
3#ifndef IPC_CODEGEN_MSGPACK_CONCEPTS_DEFINED
4#define IPC_CODEGEN_MSGPACK_CONCEPTS_DEFINED
5
6struct DoNothing {
7 void operator()(auto...) {}
8};
9
11
12template <typename T>
13concept HasMsgPack = requires(T t, DoNothing nop) { t.msgpack(nop); };
14
15template <typename T, typename... Args>
16concept MsgpackConstructible = requires(T object, Args... args) { T{ args... }; };
17
18} // namespace msgpack_concepts
19
20#endif
21
22namespace msgpack_concepts {
23
24template <typename T>
25concept HasMsgPackSchema = requires(const T t, DoNothing nop) { t.msgpack_schema(nop); };
26
27template <typename T>
28concept HasMsgPackPack = requires(T t, DoNothing nop) { t.msgpack_pack(nop); };
29
30} // namespace msgpack_concepts
void operator()(auto...)
Definition concepts.hpp:7