aboutsummaryrefslogtreecommitdiff
path: root/ttwhy
diff options
context:
space:
mode:
Diffstat (limited to 'ttwhy')
-rw-r--r--ttwhy/lib.cppm11
-rw-r--r--ttwhy/main.cpp14
2 files changed, 25 insertions, 0 deletions
diff --git a/ttwhy/lib.cppm b/ttwhy/lib.cppm
new file mode 100644
index 0000000..c7527ee
--- /dev/null
+++ b/ttwhy/lib.cppm
@@ -0,0 +1,11 @@
+export module ttwhy;
+
+namespace ttwhy
+{
+
+ export auto multiply(int lhs, int rhs) -> int
+ {
+ return lhs * rhs;
+ }
+
+} // namespace ttwhy
diff --git a/ttwhy/main.cpp b/ttwhy/main.cpp
new file mode 100644
index 0000000..fdaba88
--- /dev/null
+++ b/ttwhy/main.cpp
@@ -0,0 +1,14 @@
+#include <asio/io_context.hpp>
+
+#include <print>
+
+import ttwhy;
+
+auto main() -> int
+{
+ auto context = asio::io_context{};
+
+ std::println("The answer is {}", ttwhy::multiply(6, 7));
+
+ context.run();
+}