44 lines · c
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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H11#define _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H12 13#include <__cxx03/__config>14 15#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)16# pragma GCC system_header17#endif18 19_LIBCPP_BEGIN_NAMESPACE_STD20 21template <class _Arg1, class _Arg2, class _Result>22struct _LIBCPP_TEMPLATE_VIS binary_function {23 typedef _Arg1 first_argument_type;24 typedef _Arg2 second_argument_type;25 typedef _Result result_type;26};27 28template <class _Arg1, class _Arg2, class _Result>29struct __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_PUSH36_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")37template <class _Arg1, class _Arg2, class _Result>38using __binary_function = binary_function<_Arg1, _Arg2, _Result>;39_LIBCPP_DIAGNOSTIC_POP40 41_LIBCPP_END_NAMESPACE_STD42 43#endif // _LIBCPP___CXX03___FUNCTIONAL_BINARY_FUNCTION_H44