Avoid inifinite recursion call in tst_Compiler::cxx11_noexcept
warning: all paths through this function will call itself [-Winfinite-recursion] Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
6ab6571f24
commit
70def4341a
@ -981,9 +981,10 @@ void tst_Compiler::cxx11_noexcept()
|
|||||||
#ifndef Q_COMPILER_NOEXCEPT
|
#ifndef Q_COMPILER_NOEXCEPT
|
||||||
QSKIP("Compiler does not support C++11 feature");
|
QSKIP("Compiler does not support C++11 feature");
|
||||||
#else
|
#else
|
||||||
|
extern void may_throw();
|
||||||
extern void noexcept_f() noexcept;
|
extern void noexcept_f() noexcept;
|
||||||
extern void g() noexcept(noexcept(noexcept_f()));
|
extern void g() noexcept(noexcept(noexcept_f()));
|
||||||
QCOMPARE(noexcept(cxx11_noexcept()), false);
|
QCOMPARE(noexcept(may_throw()), false);
|
||||||
QCOMPARE(noexcept(noexcept_f), true);
|
QCOMPARE(noexcept(noexcept_f), true);
|
||||||
QCOMPARE(noexcept(g), true);
|
QCOMPARE(noexcept(g), true);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user