aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/pairuser.cpp
blob: 5b7eb4d8c8d78500b076b0f04c0fe97476429969 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "pairuser.h"

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

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

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

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