From: John Hodge Date: Sat, 24 May 2014 09:19:02 +0000 (+0800) Subject: Usermode/libc++ - Tweaks to STL X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=94602b5642f62821d759a1317b35e3bd770aefad;p=tpg%2Facess2.git Usermode/libc++ - Tweaks to STL --- 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 +