diff options
Diffstat (limited to 'sources/shiboken6/tests/libsample/pairuser.cpp')
-rw-r--r-- | sources/shiboken6/tests/libsample/pairuser.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/pairuser.cpp b/sources/shiboken6/tests/libsample/pairuser.cpp new file mode 100644 index 000000000..5b7eb4d8c --- /dev/null +++ b/sources/shiboken6/tests/libsample/pairuser.cpp @@ -0,0 +1,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; +} |