summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/class
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/c++/modules/class')
-rw-r--r--tests/projects/c++/modules/class/src/hello.mpp3
-rw-r--r--tests/projects/c++/modules/class/src/hello_impl.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/projects/c++/modules/class/src/hello.mpp b/tests/projects/c++/modules/class/src/hello.mpp
index 9e4ecd960..268964aa3 100644
--- a/tests/projects/c++/modules/class/src/hello.mpp
+++ b/tests/projects/c++/modules/class/src/hello.mpp
@@ -5,8 +5,7 @@ export namespace hello {
public:
say(int data);
void hello();
-
private:
int data_;
};
-} \ No newline at end of file
+}
diff --git a/tests/projects/c++/modules/class/src/hello_impl.cpp b/tests/projects/c++/modules/class/src/hello_impl.cpp
index 6d0008fbb..b8b572f27 100644
--- a/tests/projects/c++/modules/class/src/hello_impl.cpp
+++ b/tests/projects/c++/modules/class/src/hello_impl.cpp
@@ -1,14 +1,13 @@
-module hello;
-
+module;
#include <iostream>
-
using namespace std;
+module hello;
+
namespace hello {
say::say(int data) : data_(data) {
}
-
void say::hello() {
cout << "hello, say class: " << data_ << endl;
}