diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-20 19:42:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 19:42:17 -0500 |
| commit | 98a0b6ceed0f8d432cae61559884613df539a0a1 (patch) | |
| tree | 10583ee7130379feef0cd440266142fb6eede906 /dev/lib/logic | |
| parent | 3bc2fca2c9beff13586b8bf3089ce439acb09de1 (diff) | |
| parent | 682d03f0b8e22168e2ccd2c4a35efae230d40eb0 (diff) | |
Merge pull request #13 from amlel-el-mahrouss/developv1.0.47
release: OCL 'Cork'
Diffstat (limited to 'dev/lib/logic')
| -rw-r--r-- | dev/lib/logic/equiv.hpp | 18 | ||||
| -rw-r--r-- | dev/lib/logic/math.hpp | 2 | ||||
| -rw-r--r-- | dev/lib/logic/opt.hpp | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp index 704e451..1d16958 100644 --- a/dev/lib/logic/equiv.hpp +++ b/dev/lib/logic/equiv.hpp @@ -2,7 +2,7 @@ * File: equiv.hpp * Purpose: Equivalence runtime c++ header. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once @@ -13,8 +13,8 @@ namespace ocl::equiv template <typename T> struct basic_hash_trait { - /// @brief hash from T's result. - static typename T::result hash() + /// @brief hash from T's result_type. + static typename T::result_type hash() { static T val; return val.hash(); @@ -63,9 +63,9 @@ namespace ocl::equiv T left_ = 127, right_ = 127; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return (left_ + right_) < 1; } @@ -79,9 +79,9 @@ namespace ocl::equiv T left_ = 127, right_ = 127; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return (left_ + right_) > 0; } @@ -94,9 +94,9 @@ namespace ocl::equiv T left_ = 5, right_ = 3; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return left_ / right_ == 1; } diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp index e796eae..ce73aa6 100644 --- a/dev/lib/logic/math.hpp +++ b/dev/lib/logic/math.hpp @@ -2,7 +2,7 @@ * File: math.hpp * Purpose: Mathematics c++ header. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss. + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp index ceee917..19f02df 100644 --- a/dev/lib/logic/opt.hpp +++ b/dev/lib/logic/opt.hpp @@ -1,7 +1,7 @@ /* * File: opt.hpp * Author: Amlal El Mahrouss, - * Copyright 2023-2025, Amlal El Mahrouss + * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License */ #ifndef _OCL_OPT_HPP @@ -120,12 +120,12 @@ namespace ocl return greater_than(std::forward<Lst>(arg)...) ? return_type::okay : return_type::err; } - inline return_type eval_true() + inline return_type eval_true() noexcept { return return_type::okay; } - inline return_type eval_false() + inline return_type eval_false() noexcept { return return_type::err; } |
