Skip to content

Commit fe26d71

Browse files
refactor: Update include directives and use std::cout for output
1 parent 0eae9cc commit fe26d71

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

examples/basic.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import std;
1+
#include <iostream>
2+
23
import mcpplibs.templates;
34

45
int main() {
5-
std::println("=== mcpplibs.templates basic example ===");
6-
mcpplibs::templates::hello_mcpp();
7-
return 0;
6+
std::cout << "=== mcpplibs.templates basic example ===\n";
7+
mcpplibs::templates::hello_mcpp();
8+
return 0;
89
}

src/templates.cppm

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
module;
2-
2+
#include <iostream>
33
export module mcpplibs.templates;
44

5-
import std;
6-
75
namespace mcpplibs::templates {
86

9-
export void hello_mcpp() {
10-
std::println("hello mcpp!");
11-
}
7+
export void hello_mcpp() { std::cout << "hello mcpp!\n"; }
128

13-
}
9+
} // namespace mcpplibs::templates

0 commit comments

Comments
 (0)