Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / depr / depr.lib.binders / test_func.h
bloba187eb25a15bbd8e03cde6de5f206e20303468de
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 //===----------------------------------------------------------------------===//
9 #ifndef TEST_FUNC_H
10 #define TEST_FUNC_H
12 class test_func
14 int id_;
15 public:
16 typedef int first_argument_type;
17 typedef double second_argument_type;
18 typedef long double result_type;
20 explicit test_func(int id) : id_(id) {}
22 int id() const {return id_;}
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;}
32 #endif // TEST_FUNC_H