Improve C++ example
--
MOS_MIGRATED_REVID=87514947
diff --git a/base_workspace/examples/cpp/hello-lib.h b/base_workspace/examples/cpp/hello-lib.h
index 3e74c2b..555d177 100644
--- a/base_workspace/examples/cpp/hello-lib.h
+++ b/base_workspace/examples/cpp/hello-lib.h
@@ -1,6 +1,23 @@
-#ifndef EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
-#define EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
+#ifndef EXAMPLES_CPP_HELLO_LIB_H_
+#define EXAMPLES_CPP_HELLO_LIB_H_
-void greet(const char* object);
+#include <string>
+#include <memory>
-#endif // EXAMPLE_WORKSPACE_CPP_HELLO_LIB_H_
+namespace hello {
+
+class HelloLib {
+ public:
+ HelloLib();
+
+ explicit HelloLib(const std::string &greeting);
+
+ void greet(const std::string &thing);
+
+ private:
+ std::unique_ptr<const std::string> greeting_;
+};
+
+} // namespace hello
+
+#endif // EXAMPLES_CPP_HELLO_LIB_H_