2021-08-16 23:30:18 -07:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
//
|
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
#ifndef _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
|
|
|
|
|
#define _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
|
|
|
|
|
|
|
|
|
|
#include <__config>
|
|
|
|
|
|
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2022-08-04 17:53:05 -07:00
|
|
|
# pragma GCC system_header
|
2021-08-16 23:30:18 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
2022-08-04 17:53:05 -07:00
|
|
|
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
|
|
|
|
|
|
2021-08-16 23:30:18 -07:00
|
|
|
template <class _Arg1, class _Arg2, class _Result>
|
2025-07-16 10:46:24 +02:00
|
|
|
struct _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
|
2024-04-26 15:33:29 -07:00
|
|
|
typedef _Arg1 first_argument_type;
|
|
|
|
|
typedef _Arg2 second_argument_type;
|
|
|
|
|
typedef _Result result_type;
|
2021-08-16 23:30:18 -07:00
|
|
|
};
|
|
|
|
|
|
2022-08-04 17:53:05 -07:00
|
|
|
#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
|
|
|
|
|
|
2024-04-26 15:33:29 -07:00
|
|
|
template <class _Arg1, class _Arg2, class _Result>
|
|
|
|
|
struct __binary_function_keep_layout_base {
|
2022-08-04 17:53:05 -07:00
|
|
|
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
|
2024-04-26 15:33:29 -07:00
|
|
|
using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg1;
|
2022-08-04 17:53:05 -07:00
|
|
|
using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
|
2024-04-26 15:33:29 -07:00
|
|
|
using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
|
2022-08-04 17:53:05 -07:00
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
|
2025-07-16 10:46:24 +02:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
2022-08-04 17:53:05 -07:00
|
|
|
template <class _Arg1, class _Arg2, class _Result>
|
2025-02-05 10:50:09 +01:00
|
|
|
using __binary_function _LIBCPP_NODEBUG = binary_function<_Arg1, _Arg2, _Result>;
|
2025-07-16 10:46:24 +02:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
2022-08-04 17:53:05 -07:00
|
|
|
#else
|
|
|
|
|
template <class _Arg1, class _Arg2, class _Result>
|
2025-02-05 10:50:09 +01:00
|
|
|
using __binary_function _LIBCPP_NODEBUG = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
|
2022-08-04 17:53:05 -07:00
|
|
|
#endif
|
|
|
|
|
|
2021-08-16 23:30:18 -07:00
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
|
|
|
|
|
#endif // _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
|