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 // binary_function was removed in C++17
13 
14 // template <class Arg1, class Arg2, class Result>
15 // struct binary_function
16 // {
17 //     typedef Arg1   first_argument_type;
18 //     typedef Arg2   second_argument_type;
19 //     typedef Result result_type;
20 // };
21 
22 #include <functional>
23 #include <type_traits>
24 
main()25 int main()
26 {
27     static_assert((std::is_same<std::binary_function<int, unsigned, char>::first_argument_type, int>::value), "");
28     static_assert((std::is_same<std::binary_function<int, unsigned, char>::second_argument_type, unsigned>::value), "");
29     static_assert((std::is_same<std::binary_function<int, unsigned, char>::result_type, char>::value), "");
30 }
31