aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/pairuser.cpp
blob: 8983630e2bfac12c5f67e6fca1f18bdbee2e1d44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include "pairuser.h"

using namespace std;

std::pair<int, int>
PairUser::callCreatePair()
{
    cout << __PRETTY_FUNCTION__ << endl;
    return createPair();
}

std::pair<int, int>
PairUser::createPair()
{
    cout << __PRETTY_FUNCTION__ << endl;
    return std::pair<int, int>(10, 20);
}

std::pair<Complex, Complex>
PairUser::createComplexPair(Complex cpx0, Complex cpx1)
{
    cout << __PRETTY_FUNCTION__ << endl;
    return std::pair<Complex, Complex>(cpx0, cpx1);
}

double
PairUser::sumPair(std::pair<int, double> pair)
{
    return ((double) pair.first) + pair.second;
}