From 94602b5642f62821d759a1317b35e3bd770aefad Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 24 May 2014 17:19:02 +0800 Subject: [PATCH] Usermode/libc++ - Tweaks to STL --- .../libc++.so_src/include_exp/cassert | 3 ++ .../libc++.so_src/include_exp/string | 12 +++++ .../libc++.so_src/include_exp/utility | 54 +++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 Usermode/Libraries/libc++.so_src/include_exp/cassert create mode 100644 Usermode/Libraries/libc++.so_src/include_exp/utility diff --git a/Usermode/Libraries/libc++.so_src/include_exp/cassert b/Usermode/Libraries/libc++.so_src/include_exp/cassert new file mode 100644 index 00000000..d11b7462 --- /dev/null +++ b/Usermode/Libraries/libc++.so_src/include_exp/cassert @@ -0,0 +1,3 @@ +extern "C" { +#include +} diff --git a/Usermode/Libraries/libc++.so_src/include_exp/string b/Usermode/Libraries/libc++.so_src/include_exp/string index a32c9e96..84c3ef33 100644 --- a/Usermode/Libraries/libc++.so_src/include_exp/string +++ b/Usermode/Libraries/libc++.so_src/include_exp/string @@ -152,6 +152,18 @@ public: m_content->m_size = n; } } + #if __cplusplus < 199711L + basic_string(basic_string&& str) noexcept: + basic_string(allocator_type()) + { + } + basic_string(basic_string&& str, const allocator_type& alloc) noexcept: + basic_string(alloc) + { + m_content = str.m_content; + str.m_content = 0; + } + #endif ~basic_string() { release_content(); diff --git a/Usermode/Libraries/libc++.so_src/include_exp/utility b/Usermode/Libraries/libc++.so_src/include_exp/utility new file mode 100644 index 00000000..6f057443 --- /dev/null +++ b/Usermode/Libraries/libc++.so_src/include_exp/utility @@ -0,0 +1,54 @@ +/* + * Acess2 C++ Library + * - By John Hodge (thePowersGang) + * + * string (header) + * - C++'s String type + */ +#ifndef _LIBCXX_UTILITY_ +#define _LIBCXX_UTILITY_ + +namespace std { + +template +class pair +{ +public: + typedef T1 first_type; + typedef T2 second_type; + + first_type first; + second_type second; + + pair() + { + } + template + pair(const pair& pr): + first (pr.first), + second(pr.second) + { + } + pair(const first_type& a, const second_type& b): + first (a), + second(b) + { + } + // operator = is implicit +}; + +template +bool operator== (const pair& lhs, const pair& rhs) { + return lhs.first == rhs.first && lhs.second == rhs.second; +} +template +bool operator!= (const pair& lhs, const pair& rhs) { + return !(lhs == rhs); +} + +}; // namespace std + +#endif + +// vim: ft=cpp + -- 2.20.1