projects
/
modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update to gcc 12.2 and clang 15.0.0
[modules.git]
/
helloworld.cc
diff --git
a/helloworld.cc
b/helloworld.cc
index c2075f04f4af2252bae7d5e9f1e9a73489f7cc79..0e4312dcce6c060c60136935c6b22ea52cee143e 100644
(file)
--- a/
helloworld.cc
+++ b/
helloworld.cc
@@
-1,12
+1,15
@@
module;
module;
-#include <iostream>
-
export module helloworld;
export module helloworld;
+import <string>;
+import <iostream>;
+
export class HelloWorld {
public:
export class HelloWorld {
public:
- void hello() {
- std::cout << "hello\n";
+ std::string hello() {
+ std::cout << "hello, ";
+ std::string s = "world!";
+ return s;
}
};
}
};