Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:51

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
0011 #define _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
0012 
0013 #include <__config>
0014 
0015 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0016 #  pragma GCC system_header
0017 #endif
0018 
0019 _LIBCPP_BEGIN_NAMESPACE_STD
0020 
0021 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
0022 
0023 template <class _Arg1, class _Arg2, class _Result>
0024 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
0025   typedef _Arg1 first_argument_type;
0026   typedef _Arg2 second_argument_type;
0027   typedef _Result result_type;
0028 };
0029 
0030 #endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
0031 
0032 template <class _Arg1, class _Arg2, class _Result>
0033 struct __binary_function_keep_layout_base {
0034 #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
0035   using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17  = _Arg1;
0036   using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
0037   using result_type _LIBCPP_DEPRECATED_IN_CXX17          = _Result;
0038 #endif
0039 };
0040 
0041 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
0042 _LIBCPP_DIAGNOSTIC_PUSH
0043 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
0044 template <class _Arg1, class _Arg2, class _Result>
0045 using __binary_function _LIBCPP_NODEBUG = binary_function<_Arg1, _Arg2, _Result>;
0046 _LIBCPP_DIAGNOSTIC_POP
0047 #else
0048 template <class _Arg1, class _Arg2, class _Result>
0049 using __binary_function _LIBCPP_NODEBUG = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
0050 #endif
0051 
0052 _LIBCPP_END_NAMESPACE_STD
0053 
0054 #endif // _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H