xref: /llvm-project/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp (revision 681cde7dd8b5613dbafc9ca54e0288477f946be3)
15a83710eSEric Fiselier //===----------------------------------------------------------------------===//
25a83710eSEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65a83710eSEric Fiselier //
75a83710eSEric Fiselier //===----------------------------------------------------------------------===//
85a83710eSEric Fiselier 
95a83710eSEric Fiselier // <functional>
1031cbe0f2SLouis Dionne // REQUIRES: c++03 || c++11 || c++14
11bc933768SStephan T. Lavavej // binary_function was removed in C++17
125a83710eSEric Fiselier 
13*681cde7dSNikolas Klauser // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
14*681cde7dSNikolas Klauser 
155a83710eSEric Fiselier // template <class Arg1, class Arg2, class Result>
165a83710eSEric Fiselier // struct binary_function
175a83710eSEric Fiselier // {
185a83710eSEric Fiselier //     typedef Arg1   first_argument_type;
195a83710eSEric Fiselier //     typedef Arg2   second_argument_type;
205a83710eSEric Fiselier //     typedef Result result_type;
215a83710eSEric Fiselier // };
225a83710eSEric Fiselier 
235a83710eSEric Fiselier #include <functional>
245a83710eSEric Fiselier #include <type_traits>
255a83710eSEric Fiselier 
267fc6a556SMarshall Clow #include "test_macros.h"
277fc6a556SMarshall Clow 
main(int,char **)282df59c50SJF Bastien int main(int, char**)
295a83710eSEric Fiselier {
305a83710eSEric Fiselier     static_assert((std::is_same<std::binary_function<int, unsigned, char>::first_argument_type, int>::value), "");
315a83710eSEric Fiselier     static_assert((std::is_same<std::binary_function<int, unsigned, char>::second_argument_type, unsigned>::value), "");
325a83710eSEric Fiselier     static_assert((std::is_same<std::binary_function<int, unsigned, char>::result_type, char>::value), "");
332df59c50SJF Bastien 
342df59c50SJF Bastien   return 0;
355a83710eSEric Fiselier }
36