summaryrefslogtreecommitdiffstats
path: root/tools/build/feature/test-cxx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/feature/test-cxx.cpp')
-rw-r--r--tools/build/feature/test-cxx.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/build/feature/test-cxx.cpp b/tools/build/feature/test-cxx.cpp
new file mode 100644
index 000000000..396aaedd2
--- /dev/null
+++ b/tools/build/feature/test-cxx.cpp
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <iostream>
+#include <memory>
+
+static void print_str(std::string s)
+{
+ std::cout << s << std::endl;
+}
+
+int main()
+{
+ std::string s("Hello World!");
+ print_str(std::move(s));
+ std::cout << "|" << s << "|" << std::endl;
+ return 0;
+}