================
@@ -0,0 +1,101 @@
+namespace std {
+
+typedef decltype(nullptr) nullptr_t;
+typedef unsigned long size_t;
+
+template <typename T>
+struct default_delete {
+ void operator()(T* p) const;
+};
+
+template <typename T>
+struct default_delete<T[]> {
+ void operator()(T* p) const;
+};
+
+template <typename T, typename Deleter = default_delete<T>>
+class unique_ptr {
+public:
+ unique_ptr();
+ explicit unique_ptr(T* p);
+ unique_ptr(T* p, Deleter d) {}
+ unique_ptr(std::nullptr_t);
+
+ T* release();
+
+ void reset(T* p = nullptr);
+
+ template <typename D>
+ void reset(T* p, D d) {}
+};
+
+template <typename T, typename Deleter>
+class unique_ptr<T[], Deleter> {
+public:
+ unique_ptr();
+ template <typename U>
+ explicit unique_ptr(U* p);
+ template <typename U>
+ unique_ptr(U* p, Deleter d) {}
+ unique_ptr(std::nullptr_t);
+
+ T* release();
+
+ void reset(T* p = nullptr);
+
+ template <typename D>
+ void reset(T* p, D d) {}
+};
+
+template <typename T>
+class shared_ptr {
+public:
+ shared_ptr();
+ explicit shared_ptr(T* p);
+ template <typename Deleter>
+ shared_ptr(T* p, Deleter d) {}
+ shared_ptr(std::nullptr_t);
+
+ T* release();
----------------
denzor200 wrote:
Ah, sure, my apologize for misattention
https://github.com/llvm/llvm-project/pull/181570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits