-
-
Save Necklaces/7077a3ef6490960768c67d6b5437efa0 to your computer and use it in GitHub Desktop.
Revisions
-
vladiant created this gist
Jul 10, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ main : main.o hello.o g++-11 -o main main.o hello.o main.o : main.cpp gcm.cache/smd.hello.gcm g++-11 -fPIC -fmodules-ts -std=c++20 -o main.o -c main.cpp hello.o: hello.cpp g++-11 -fPIC -fmodules-ts -std=c++20 -o hello.o -c hello.cpp gcm.cache/smd.hello.gcm: hello.o @test -f $@ || rm -f $< @test -f $@ || $(MAKE) $< clean: rm hello.o main.o gcm.cache/smd.hello.gcm clean-gcm: rm gcm.cache/smd.hello.gcm test: ./main all: main This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // hello.cpp module; #include <iostream> #include <string_view> export module smd.hello; export namespace hello { void hello(std::string_view name) { std::cout << "Hello, " << name << "! \n"; } } // namespace hello This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ // main.cxx import smd.hello; int main() { hello::hello("Steve"); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ https://github.com/steve-downey/module-hw/blob/master/main.cpp