From 0f6b759e11451b9cdae4b5f64fdcc82989161482 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Jul 2017 08:55:33 +0200 Subject: Add modularized version --- libmhello/libmhello/hello.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libmhello/libmhello/hello.cxx (limited to 'libmhello/libmhello/hello.cxx') diff --git a/libmhello/libmhello/hello.cxx b/libmhello/libmhello/hello.cxx new file mode 100644 index 0000000..ff01860 --- /dev/null +++ b/libmhello/libmhello/hello.cxx @@ -0,0 +1,20 @@ +// file: libmhello/hello.cxx -*- C++ -*- + +module hello; + +#ifdef __clang__ +import std.core; +#endif + +import std.io; + +using namespace std; + +namespace hello +{ + void + say (const string& n) + { + cout << "Hello, " << n << '!' << endl; + } +} -- cgit v1.1