7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_COMPLEX_NORM_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_COMPLEX_NORM_HPP_
18#include "arene/base/stdlib_choice/declval.hpp"
19#include "arene/base/stdlib_choice/enable_if.hpp"
25namespace complex_norm_detail {
28class complex_l1_norm_impl {
35 template <
typename T, constra
ints<std::enable_if_t<math::is_complex_v<T>>> =
nullptr>
36 constexpr auto operator()(T
const& value)
const noexcept(
38 ) ->
decltype(math::abs(math::real(value)) + math::abs(math::imag(value))) {
40 return math::abs(math::real(value)) + math::abs(math::imag(value));
49 template <
typename T, constra
ints<std::enable_if_t<!math::is_complex_v<T>>> =
nullptr>
51 ->
decltype(math::abs(value)) {
52 return math::abs(value);
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition accumulate.hpp:37
Definition accumulate.hpp:36
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...