brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1010 B · a187eb2 Raw
33 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef TEST_FUNC_H10#define TEST_FUNC_H11 12class test_func13{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) const25        {return x+y;}26    result_type operator() (const first_argument_type& x, const second_argument_type& y) const27        {return x-y;}28    result_type operator() (first_argument_type& x, const second_argument_type& y) const29        {return x*y;}30};31 32#endif // TEST_FUNC_H33