1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef TEST_FUNC_H
10#define TEST_FUNC_H
11
12class test_func
13{
14 int id_;
15public:
16 typedef int first_argument_type;
17 typedef double second_argument_type;
18 typedef long double result_type;
19
20 explicit test_func(int id) : id_(id) {}
21
22 int id() const {return id_;}
23
24 result_type operator() (const first_argument_type& x, second_argument_type& y) const
25 {return x+y;}
26 result_type operator() (const first_argument_type& x, const second_argument_type& y) const
27 {return x-y;}
28 result_type operator() (first_argument_type& x, const second_argument_type& y) const
29 {return x*y;}
30};
31
32#endif // TEST_FUNC_H
33

source code of libcxx/test/std/depr/depr.lib.binders/test_func.h