/* * Acess2 C++ Library * - By John Hodge (thePowersGang) * * string (header) * - C++'s String type */ #ifndef _LIBCXX_UTILITY_ #define _LIBCXX_UTILITY_ #include "_libcxx_helpers.h" #include "type_traits" 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) { } pair(const pair& pr): first(pr.first), second(pr.second) { } pair(pair&& pr): first(pr.first), second(pr.second) { } // operator = is implicit pair& operator=(const pair& x) { first = x.first; second = x.second; return *this; } }; 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); } #if _CXX11_AVAIL template T&& forward(typename remove_reference::type& arg) noexcept { return static_cast(arg); } template T&& forward(typename remove_reference::type&& arg) noexcept { return static_cast(arg); } template typename remove_reference::type&& move( T&& t) noexcept { return static_cast::type&&>(t); } //template //constexpr typename ::std::remove_reference::type&& move( T&& t) noexcept { // return static_cast::type&&>(t); //} #endif }; // namespace std #endif // vim: ft=cpp