Switch demo code to using std::make_unique
diff --git a/demo-cxx/demo.cc b/demo-cxx/demo.cc
index cd447ea..21bdad4 100644
--- a/demo-cxx/demo.cc
+++ b/demo-cxx/demo.cc
@@ -10,7 +10,7 @@
ThingC::~ThingC() { std::cout << "done with ThingC" << std::endl; }
std::unique_ptr<ThingC> make_demo(rust::Str appname) {
- return std::unique_ptr<ThingC>(new ThingC(std::string(appname)));
+ return std::make_unique<ThingC>(std::string(appname));
}
const std::string &get_name(const ThingC &thing) { return thing.appname; }