summaryrefslogtreecommitdiffhomepage
path: root/include/ocl/is_same.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ocl/is_same.hpp')
-rw-r--r--include/ocl/is_same.hpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/ocl/is_same.hpp b/include/ocl/is_same.hpp
index de3425e..ec3eb66 100644
--- a/include/ocl/is_same.hpp
+++ b/include/ocl/is_same.hpp
@@ -68,7 +68,7 @@ namespace ocl
T left_ = 127, right_ = 127;
public:
- using result_type = T;
+ using result_type = bool;
constexpr result_type hash()
{
@@ -84,7 +84,7 @@ namespace ocl
T left_ = 127, right_ = 127;
public:
- using result_type = T;
+ using result_type = bool;
constexpr result_type hash()
{
@@ -99,11 +99,26 @@ namespace ocl
T left_ = 5, right_ = 3;
public:
- using result_type = T;
+ using result_type = bool;
constexpr result_type hash()
{
- return left_ / right_ == 1;
+ return (left_ / right_) == 1;
+ }
+ };
+
+ template <typename T>
+ struct equiv_is
+ {
+ private:
+ T left_{}, right_{};
+
+ public:
+ using result_type = bool;
+
+ constexpr result_type hash()
+ {
+ return (left_ / right_);
}
};
} // namespace ocl