summaryrefslogtreecommitdiffhomepage
path: root/dev/examples/equiv
diff options
context:
space:
mode:
Diffstat (limited to 'dev/examples/equiv')
-rw-r--r--dev/examples/equiv/CMakeLists.txt12
-rw-r--r--dev/examples/equiv/equiv.cc19
2 files changed, 31 insertions, 0 deletions
diff --git a/dev/examples/equiv/CMakeLists.txt b/dev/examples/equiv/CMakeLists.txt
new file mode 100644
index 0000000..8b29e23
--- /dev/null
+++ b/dev/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 ../../)
diff --git a/dev/examples/equiv/equiv.cc b/dev/examples/equiv/equiv.cc
new file mode 100644
index 0000000..896637d
--- /dev/null
+++ b/dev/examples/equiv/equiv.cc
@@ -0,0 +1,19 @@
+/*
+ string checksum example
+ written by Amlal El Mahrouss.
+ licensed under the MIT license
+ */
+
+#include <lib/logic/equiv.hpp>
+#include <iostream>
+
+/* finally test it */
+int main(int argc, char** argv)
+{
+ std::cout << std::boolalpha;
+ std::cout << snu::equiv::is_same<bool, int>::value << std::endl;
+ std::cout << snu::equiv::is_same<bool, bool>::value << std::endl;
+ std::cout << snu::equiv::is_same<int, int>::value << std::endl;
+
+ return 0;
+}