Update to gcc 12.2 and clang 15.0.0
[modules.git] / main.cc
diff --git a/main.cc b/main.cc
index 9221a3526e26d7f9b468c2a5fbf87a0a34cda42e..03bce8213a7d369334eb8488f6e75f229c4ec422 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -1,13 +1,15 @@
-//#include <string>
-
 import helloworld;
-//import <string>;
 
-int main() {
-    //std::string s = "foo";
+#ifdef __clang__
+    import std;
+#else  // not yet in GCC 12.2 :-(
+    import <string>;
+    import <iostream>;
+#endif
 
+int main() {
     helloworld:HelloWorld h;
-    h.hello();
-
+    std::string s = h.hello();
+    std::cout << s << '\n';
     return 0;
 }