1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef TEST_FUNC_H
11 #define TEST_FUNC_H
12 
13 class test_func
14 {
15     int id_;
16 public:
17     typedef int first_argument_type;
18     typedef double second_argument_type;
19     typedef long double result_type;
20 
test_func(int id)21     explicit test_func(int id) : id_(id) {}
22 
id()23     int id() const {return id_;}
24 
operator()25     result_type operator() (const first_argument_type& x, second_argument_type& y) const
26         {return x+y;}
operator()27     result_type operator() (const first_argument_type& x, const second_argument_type& y) const
28         {return x-y;}
operator()29     result_type operator() (first_argument_type& x, const second_argument_type& y) const
30         {return x*y;}
31 };
32 
33 #endif  // TEST_FUNC_H
34