summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-21 01:20:03 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-21 01:20:03 +0100
commit7e757c3eacb05756b0f616e4ace46c098c39a05c (patch)
tree3d5109a3cbdeb74a48813a3684775b691ef4f5ff
parentbb9af1fde25f5c2b4feeaa474392797ae5c4599d (diff)
feat: logic: module improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--dev/lib/logic/equiv.hpp16
-rw-r--r--dev/lib/logic/opt.hpp4
2 files changed, 10 insertions, 10 deletions
diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp
index 704e451..c743e0b 100644
--- a/dev/lib/logic/equiv.hpp
+++ b/dev/lib/logic/equiv.hpp
@@ -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/opt.hpp b/dev/lib/logic/opt.hpp
index ceee917..1b2211b 100644
--- a/dev/lib/logic/opt.hpp
+++ b/dev/lib/logic/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;
}