summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2020-02-25 17:23:48 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2020-04-06 09:27:01 +0200
commit9ead0b04318345e8f2f573125e10c99f0a4b8e3c (patch)
treef6b3e075b6ba398f0c20d78f79f78861a4d4431c /tests
parent3f9862db95ffbe1f87bc17b147b5c68954b4044d (diff)
tst_QScopeGuard: Fix build by giving template parameters explicitly
std::function does not have deduction guides in older libc++ (presumably older than version 10). Omitting the template parameter isn't essential for the test, so just give it. Change-Id: Ia9bb91f961b0928203737ec976913effd06433e0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
index e5393f694e..dded694001 100644
--- a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
+++ b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
@@ -100,8 +100,8 @@ void tst_QScopeGuard::construction()
QScopeGuard fromFunctionPointer(&func);
QScopeGuard fromNonVoidFunction(intFunc);
QScopeGuard fromNoDiscardFunction(noDiscardFunc);
- QScopeGuard fromStdFunction{std::function(func)};
- std::function stdFunction(func);
+ QScopeGuard fromStdFunction{std::function<void()>(func)};
+ std::function<void()> stdFunction(func);
QScopeGuard fromNamedStdFunction(stdFunction);
#else
QSKIP("This test requires C++17 Class Template Argument Deduction support enabled in the compiler.");