Warning: This file is not a C or C++ file. It does not have highlighting.

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
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_PUSH
36_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
37template <class _Arg1, class _Arg2, class _Result>
38using __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

Warning: This file is not a C or C++ file. It does not have highlighting.

Provided by KDAB

Privacy Policy
Update your C++ knowledge – Modern C++11/14/17 Training
Find out more

source code of libcxx/include/__cxx03/__functional/binary_function.h