aboutsummaryrefslogtreecommitdiff
path: root/c/wcharptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/wcharptr.h')
-rw-r--r--c/wcharptr.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/c/wcharptr.h b/c/wcharptr.h
deleted file mode 100644
index 2267017..0000000
--- a/c/wcharptr.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef WCHARPTR_H
-#define WCHARPTR_H
-
-#include <windows.h>
-
-/* WcharPtr: Simple wrapper for wide C strings. */
-struct WcharPtr
-{
- /* Named copy constructors (expensive). */
- static WcharPtr FromNarrow(const char* buf, int cp = CP_UTF8);
- static WcharPtr Copy(const wchar_t* s);
-
- /* Non-explicit copies are disabled. */
- WcharPtr(WcharPtr& other) = delete;
- WcharPtr& operator=(WcharPtr& other) = delete;
-
- WcharPtr() noexcept;
- ~WcharPtr();
- operator wchar_t*() noexcept;
-
- WcharPtr(wchar_t* s) noexcept;
- WcharPtr& operator=(wchar_t* s) noexcept;
-
- WcharPtr(WcharPtr&& other) noexcept;
- WcharPtr& operator=(WcharPtr&& other) noexcept;
-
- /* Return pointer, releasing ownership. */
- wchar_t *Release() noexcept;
-private:
- wchar_t* m_p = nullptr;
-};
-
-#endif