diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-09-30 14:12:02 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-10-02 17:54:39 +0200 |
commit | 9a3f4afb700bb4fb6c4d26120de71fb61ffab032 (patch) | |
tree | 5d9942baad0301712beb1f462eee6c7c6ca8432f /tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp | |
parent | a1e7c441de16cb4e8d6bdac39160759116ecd233 (diff) |
Remove checks for features available in C++17
This patch removes most of the checks that are made using C++20
__cpp_* macros for features available in C++17 and earlier.
Library feature check macros (__cpp_lib_*) are unaffected.
Change-Id: I557b2bd0d4ff09b13837555e9880eb28e0355f64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp index 21567137fd..90b3557ef5 100644 --- a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp +++ b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp @@ -94,7 +94,6 @@ static int s_globalState = 0; void tst_QScopeGuard::construction() { -#ifdef __cpp_deduction_guides QScopeGuard fromLambda([] { }); QScopeGuard fromFunction(func); QScopeGuard fromFunctionPointer(&func); @@ -105,14 +104,10 @@ void tst_QScopeGuard::construction() std::function<void()> stdFunction(func); QScopeGuard fromNamedStdFunction(stdFunction); #endif -#else - QSKIP("This test requires C++17 Class Template Argument Deduction support enabled in the compiler."); -#endif } void tst_QScopeGuard::constructionFromLvalue() { -#ifdef __cpp_deduction_guides Callable::resetCounts(); { Callable callable; @@ -127,14 +122,10 @@ void tst_QScopeGuard::constructionFromLvalue() } QCOMPARE(Callable::copied, 1); QCOMPARE(Callable::moved, 0); -#else - QSKIP("This test requires C++17 Class Template Argument Deduction support enabled in the compiler."); -#endif } void tst_QScopeGuard::constructionFromRvalue() { -#ifdef __cpp_deduction_guides Callable::resetCounts(); { Callable callable; @@ -149,9 +140,6 @@ void tst_QScopeGuard::constructionFromRvalue() } QCOMPARE(Callable::copied, 0); QCOMPARE(Callable::moved, 1); -#else - QSKIP("This test requires C++17 Class Template Argument Deduction support enabled in the compiler."); -#endif } void tst_QScopeGuard::leavingScope() |