// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #pragma once namespace jitstd { template void swap(T& a, T& b) { T t(a); a = b; b = t; } template struct unary_function { typedef Arg argument_type; typedef Result result_type; }; template struct binary_function { typedef Arg1 first_argument_type; typedef Arg2 second_argument_type; typedef Result result_type; }; template struct greater : binary_function { bool operator()(const T& lhs, const T& rhs) const { return lhs > rhs; } }; template struct equal_to : binary_function { bool operator()(const T& lhs, const T& rhs) const { return lhs == rhs; } }; template struct identity : unary_function { const T& operator()(const T& op) const { return op; } }; } // end of namespace jitstd.