================
@@ -0,0 +1,25 @@
+#include <memory>
+
+int main(int argc, char **argv) {
+
+  struct NodeU {
+    std::unique_ptr<NodeU> next;
+    int value;
+  };
+  auto ptr_node = std::unique_ptr<NodeU>(new NodeU{nullptr, 2});
+  ptr_node = std::unique_ptr<NodeU>(new NodeU{std::move(ptr_node), 1});
+
+  std::unique_ptr<char> ptr_null;
+  auto ptr_int = std::make_unique<int>(1);
+  auto ptr_float = std::make_unique<float>(1.1f);
+
+  auto deleter = [](void const *data) {
+    delete static_cast<int const *>(data);
+  };
+  std::unique_ptr<void, decltype(deleter)> ptr_void(new int(42), deleter);
+
+  // TestUniquePtr
+  // TestUniquePtrDeref
+  // TestUniquePtrCompare
----------------
labath wrote:

?

https://github.com/llvm/llvm-project/pull/143786
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to