Usermode/libc++ - Tweaks to STL
authorJohn Hodge <[email protected]>
Sat, 24 May 2014 09:19:02 +0000 (17:19 +0800)
committerJohn Hodge <[email protected]>
Sat, 24 May 2014 09:19:02 +0000 (17:19 +0800)
Usermode/Libraries/libc++.so_src/include_exp/cassert [new file with mode: 0644]
Usermode/Libraries/libc++.so_src/include_exp/string
Usermode/Libraries/libc++.so_src/include_exp/utility [new file with mode: 0644]

diff --git a/Usermode/Libraries/libc++.so_src/include_exp/cassert b/Usermode/Libraries/libc++.so_src/include_exp/cassert
new file mode 100644 (file)
index 0000000..d11b746
--- /dev/null
@@ -0,0 +1,3 @@
+extern "C" {
+#include <assert.h>
+}
index a32c9e9..84c3ef3 100644 (file)
@@ -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 (file)
index 0000000..6f05744
--- /dev/null
@@ -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 T1, class T2>
+class pair
+{
+public:
+       typedef T1      first_type;
+       typedef T2      second_type;
+       
+       first_type      first;
+       second_type     second;
+       
+       pair()
+       {
+       }
+       template <class U, class V>
+       pair(const pair<U,V>& pr):
+               first (pr.first),
+               second(pr.second)
+       {
+       }
+       pair(const first_type& a, const second_type& b):
+               first (a),
+               second(b)
+       {
+       }
+       // operator = is implicit
+};
+
+template <class T1, class T2>  
+bool operator== (const pair<T1,T2>& lhs, const pair<T1,T2>& rhs) {
+       return lhs.first == rhs.first && lhs.second == rhs.second;
+}
+template <class T1, class T2>  
+bool operator!= (const pair<T1,T2>& lhs, const pair<T1,T2>& rhs) {
+       return !(lhs == rhs);
+}
+
+};     // namespace std
+
+#endif
+
+// vim: ft=cpp
+

UCC git Repository :: git.ucc.asn.au