Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
relation_macros.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
4#include <utility>
5
6// This function/macros is used to possibly cast pol aliases in a relation's accumulate.
7template <typename View, typename FF_> constexpr auto avm_relations_maybe_cast_(auto&& v)
8{
9 if constexpr (std::is_same_v<std::decay_t<decltype(v)>, FF_>) {
11 } else {
12 return static_cast<View>(std::forward<decltype(v)>(v));
13 }
14};
15
16#define CView(v) avm_relations_maybe_cast_<View, FF_>(v)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
constexpr auto avm_relations_maybe_cast_(auto &&v)