File indexing completed on 2026-05-03 08:13:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
0011 #define _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
0012
0013 #include <__config>
0014 #include <__functional/binary_function.h>
0015
0016 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0017 # pragma GCC system_header
0018 #endif
0019
0020 _LIBCPP_BEGIN_NAMESPACE_STD
0021
0022 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
0023
0024 template <class _Arg1, class _Arg2, class _Result>
0025 class _LIBCPP_TEMPLATE_VIS
0026 _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
0027 _Result (*__f_)(_Arg1, _Arg2);
0028
0029 public:
0030 _LIBCPP_HIDE_FROM_ABI explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2)) : __f_(__f) {}
0031 _LIBCPP_HIDE_FROM_ABI _Result operator()(_Arg1 __x, _Arg2 __y) const { return __f_(__x, __y); }
0032 };
0033
0034 template <class _Arg1, class _Arg2, class _Result>
0035 _LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_binary_function<_Arg1, _Arg2, _Result>
0036 ptr_fun(_Result (*__f)(_Arg1, _Arg2)) {
0037 return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__f);
0038 }
0039
0040 #endif
0041
0042 _LIBCPP_END_NAMESPACE_STD
0043
0044 #endif