xref: /freebsd/contrib/llvm-project/libcxx/include/__cxx03/__functional/binary_function.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H
11 #define _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H
12 
13 #include <__cxx03/__config>
14 
15 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16 #  pragma GCC system_header
17 #endif
18 
19 _LIBCPP_BEGIN_NAMESPACE_STD
20 
21 template <class _Arg1, class _Arg2, class _Result>
22 struct _LIBCPP_TEMPLATE_VIS binary_function {
23   typedef _Arg1 first_argument_type;
24   typedef _Arg2 second_argument_type;
25   typedef _Result result_type;
26 };
27 
28 template <class _Arg1, class _Arg2, class _Result>
29 struct __binary_function_keep_layout_base {
30   using first_argument_type  = _Arg1;
31   using second_argument_type = _Arg2;
32   using result_type          = _Result;
33 };
34 
35 _LIBCPP_DIAGNOSTIC_PUSH
36 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
37 template <class _Arg1, class _Arg2, class _Result>
38 using __binary_function = binary_function<_Arg1, _Arg2, _Result>;
39 _LIBCPP_DIAGNOSTIC_POP
40 
41 _LIBCPP_END_NAMESPACE_STD
42 
43 #endif // _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H
44