Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
function_identity.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
4
5namespace uni20::detail
6{
7template <auto Function> struct function_identity;
8
9// Select provider operations by template identity, without evaluating pointer
10// equality. GCC with UBSan rejects constant-expression comparisons of distinct
11// externally declared functions, including MPFR and MPC entry points.
12template <auto Left, auto Right>
13inline constexpr bool same_function_v = std::is_same_v<function_identity<Left>, function_identity<Right>>;
14} // namespace uni20::detail