1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <functional> 10 // REQUIRES: c++98 || c++03 || c++11 || c++14 11 // unary_function was removed in C++17 12 13 // template <class Arg, class Result> 14 // struct unary_function 15 // { 16 // typedef Arg argument_type; 17 // typedef Result result_type; 18 // }; 19 20 #include <functional> 21 #include <type_traits> 22 23 #include "test_macros.h" 24 25 int main(int, char**) 26 { 27 static_assert((std::is_same<std::unary_function<unsigned, char>::argument_type, unsigned>::value), ""); 28 static_assert((std::is_same<std::unary_function<unsigned, char>::result_type, char>::value), ""); 29 30 return 0; 31 } 32