AsmGrader 0.0.0
Loading...
Searching...
No Matches
compatible_function_args.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace asmgrader {
7
8namespace detail {
9
10template <typename Func, typename... Args>
12{
13 static_assert(always_false_v<Func>, "Not supported for non-function types");
14};
15
16template <typename Ret, typename... FuncArgs, typename... Args>
17struct CompatibleFunctionArgsImpl<Ret(FuncArgs...), Args...>
18{
19 static constexpr bool value = (MemoryIOCompatible<FuncArgs, Args> && ...);
20};
21
22} // namespace detail
23
24template <typename Func, typename... Args>
25concept CompatibleFunctionArgs = detail::CompatibleFunctionArgsImpl<Func, Args...>::value;
26
27} // namespace asmgrader
Definition compatible_function_args.hpp:25
A trait for types that are compatible in how they are read and written to memory.
Definition concepts.hpp:80
Definition asm_buffer.hpp:19
constexpr bool always_false_v
Definition always_false.hpp:16
Definition compatible_function_args.hpp:12