Open C++ Libraries.org develop
Loading...
Searching...
No Matches
equiv_fwd.hpp
1// SPDX-License-Identifier: BSL-1.0
2// Copyright 2025-2026, Amlal El Mahrouss (amlal@nekernel.org)
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5// Official repository: https://github.com/open-cpp-libraries/core
6
7#ifndef OCL_CORE_EQUIV
8#define OCL_CORE_EQUIV
9
10#include <ocl/detail/config.hpp>
11
13
14namespace ocl
15{
16
17 template <typename Type>
18 struct is_real final
19 {
20 using type = Type;
21 static constexpr auto value = false;
22 };
23
24 template <typename L, typename R>
25 struct equiv_to final
26 {
27 using left_type = L;
28 using right_type = R;
29
30 static constexpr auto value = false;
31 };
32
33 template <typename L>
34 struct equiv_to<L, L> final
35 {
36 static constexpr auto value = true;
37 };
38
39 template <>
40 struct is_real<double> final
41 {
42 static constexpr auto value = true;
43 };
44
45 template <>
46 struct is_real<float> final
47 {
48 static constexpr auto value = true;
49 };
50
52 template <typename Type>
54
55} // namespace ocl
56
57#endif
Memory allocator for OCL support.
Definition allocator_fwd.hpp:16
Definition equiv_fwd.hpp:26
Definition equiv_fwd.hpp:19