summaryrefslogtreecommitdiffhomepage
path: root/examples/equiv
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-23 20:16:02 -0500
committerGitHub <noreply@github.com>2025-11-23 20:16:02 -0500
commit85f89ee4bb137100cbeffcbc10168eb8ea52e6cc (patch)
treef6e2063319ceaaa02f523fb5c289e4f37411a2df /examples/equiv
parent9a70f32ddaec0eef99efbf7ff5597c2adf08f45a (diff)
parent65a8349aa5526d071b18cd4d42586c46faaa3823 (diff)
Merge pull request #18 from amlel-el-mahrouss/developv1.0.48
OCL v1.0.48
Diffstat (limited to 'examples/equiv')
-rw-r--r--examples/equiv/CMakeLists.txt12
-rw-r--r--examples/equiv/equiv.cc19
2 files changed, 31 insertions, 0 deletions
diff --git a/examples/equiv/CMakeLists.txt b/examples/equiv/CMakeLists.txt
new file mode 100644
index 0000000..4a374ce
--- /dev/null
+++ b/examples/equiv/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+cmake_minimum_required(VERSION 3.15...3.31)
+
+project(
+ Equiv
+ VERSION 1.0
+ LANGUAGES CXX)
+
+add_executable(Equiv equiv.cc)
+
+set_property(TARGET Equiv PROPERTY CXX_STANDARD 20)
+target_include_directories(Equiv PUBLIC ../../include/ocl)
diff --git a/examples/equiv/equiv.cc b/examples/equiv/equiv.cc
new file mode 100644
index 0000000..0c68e21
--- /dev/null
+++ b/examples/equiv/equiv.cc
@@ -0,0 +1,19 @@
+/*
+ string checksum example
+ written by Amlal El Mahrouss.
+ licensed under the Boost Software License
+ */
+
+#include <logic/equiv.hpp>
+#include <iostream>
+
+/* finally test it */
+int main(int argc, char** argv)
+{
+ std::cout << std::boolalpha;
+ std::cout << ocl::equiv::is_same<bool, int>::value << std::endl;
+ std::cout << ocl::equiv::is_same<bool, bool>::value << std::endl;
+ std::cout << ocl::equiv::is_same<int, int>::value << std::endl;
+
+ return 0;
+}