summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/namespace2/src/hello_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/c++/modules/namespace2/src/hello_impl.cpp')
-rw-r--r--tests/projects/c++/modules/namespace2/src/hello_impl.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/projects/c++/modules/namespace2/src/hello_impl.cpp b/tests/projects/c++/modules/namespace2/src/hello_impl.cpp
new file mode 100644
index 000000000..064afebad
--- /dev/null
+++ b/tests/projects/c++/modules/namespace2/src/hello_impl.cpp
@@ -0,0 +1,23 @@
+module;
+#include <iostream>
+
+module hello;
+import mod;
+
+void inner() {
+ std::cout << "hello world! data: "
+ << mod::foo() << std::endl;
+}
+
+namespace hello {
+ int data__;
+ void say_hello() { ::inner(); }
+
+ say::say(int data) : data_{data} {
+ }
+
+ void say::hello() {
+ hello::data__ = data_;
+ ::inner();
+ }
+}