summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp')
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
new file mode 100644
index 0000000000..0ad9e7b7b2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright OpenEmbedded Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#pragma once
+
+#include <string>
+
+struct CppExample
+{
+ inline static const std::string test_string = "cpp-example-lib Magic: 123456789";
+
+ /* Retrieve a constant string */
+ const std::string &get_string();
+ /* Retrieve a constant string from a library */
+ const char *get_json_c_version();
+ /* Call a more advanced function from a library */
+ void print_json();
+};