// -*- c++ -*- #pragma once #include #include namespace std { template T&& forward(typename remove_reference::type& t) { return static_cast(t); } template T&& forward(typename remove_reference::type&& t) { return static_cast(t); } template typename remove_reference::type&& move(T&& a) { return static_cast::type&&>(a); } template void swap(T& a, T& b) { T tmp = move(a); a = move(b); b = move(tmp); } template void swap(T (&a)[N], T (&b)[N]) { for (size_t n = 0; n < N; n++) swap(a[n], b[n]); } template struct pair { typedef A first_type; typedef B second_type; A first; B second; pair(const pair&) = default; pair(pair&&) = default; constexpr pair() : first(), second() {} pair(const A &a, const B &b) : first(a), second(b) {} bool operator==(const pair &other) const { return first == other.first && second == other.second; } }; template pair make_pair(const A &a, const B &b) { return pair(a, b); } }