1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <functional> 11 // REQUIRES: c++98 || c++03 || c++11 || c++14 12 // unary_function was removed in C++17 13 14 // template <class Arg, class Result> 15 // struct unary_function 16 // { 17 // typedef Arg argument_type; 18 // typedef Result result_type; 19 // }; 20 21 #include <functional> 22 #include <type_traits> 23 main()24int main() 25 { 26 static_assert((std::is_same<std::unary_function<unsigned, char>::argument_type, unsigned>::value), ""); 27 static_assert((std::is_same<std::unary_function<unsigned, char>::result_type, char>::value), ""); 28 } 29