File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 77 * https://github.com/eranpeer/FakeIt
88 */
99
10-
11-
12-
13-
1410#include < functional>
1511#include < memory>
1612#include < set>
3127#include < atomic>
3228#include < tuple>
3329
30+ #if defined(__cplusplus) && __cplusplus >= 201703L
31+ // replace deprecated std::uncaught_exception() with with uncaught_exceptions() for gnu++17 support
32+ #endif
33+
3434
3535namespace fakeit {
3636
@@ -8360,9 +8360,16 @@ namespace fakeit {
83608360
83618361 virtual ~StubbingChange () THROWS {
83628362
8363+ #if defined(__cplusplus) && __cplusplus >= 201703L
8364+ if (std::uncaught_exceptions ()) {
8365+ return ;
8366+ }
8367+ #else
83638368 if (std::uncaught_exception ()) {
83648369 return ;
83658370 }
8371+ #endif
8372+
83668373
83678374 _xaction.commit ();
83688375 }
@@ -8620,9 +8627,15 @@ namespace fakeit {
86208627 friend class SequenceVerificationProgress ;
86218628
86228629 ~SequenceVerificationExpectation () THROWS {
8630+ #if defined(__cplusplus) && __cplusplus >= 201703L
8631+ if (std::uncaught_exceptions ()) {
8632+ return ;
8633+ }
8634+ #else
86238635 if (std::uncaught_exception ()) {
86248636 return ;
86258637 }
8638+ #endif
86268639 VerifyExpectation (_fakeit);
86278640 }
86288641
@@ -8982,9 +8995,15 @@ namespace fakeit {
89828995 friend class VerifyNoOtherInvocationsVerificationProgress ;
89838996
89848997 ~VerifyNoOtherInvocationsExpectation () THROWS {
8998+ #if defined(__cplusplus) && __cplusplus >= 201703L
8999+ if (std::uncaught_exceptions ()) {
9000+ return ;
9001+ }
9002+ #else
89859003 if (std::uncaught_exception ()) {
89869004 return ;
89879005 }
9006+ #endif
89889007
89899008 VerifyExpectation (_fakeit);
89909009 }
You can’t perform that action at this time.
0 commit comments