/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace AK::Concepts { #if defined(__cpp_concepts) && !defined(__COVERITY__) template concept Integral = IsIntegral; template concept FloatingPoint = IsFloatingPoint; template concept Arithmetic = IsArithmetic; template concept Signed = IsSigned; template concept Unsigned = IsUnsigned; template concept SameAs = IsSame; template concept VoidFunction = requires(Func func, Args... args) { { func(args...) } ->SameAs; }; template concept IteratorFunction = requires(Func func, Args... args) { { func(args...) } ->SameAs; }; #endif } #if defined(__cpp_concepts) && !defined(__COVERITY__) using AK::Concepts::Arithmetic; using AK::Concepts::FloatingPoint; using AK::Concepts::Integral; using AK::Concepts::IteratorFunction; using AK::Concepts::Signed; using AK::Concepts::Unsigned; using AK::Concepts::VoidFunction; #endif