ewmscp
..
cplusplusgoodies
unwindCheck.h
Go to the documentation of this file.
1
#ifndef __unwindCheck_h__
2
#define __unwindCheck_h__
3
#include <exception>
4
5
class
unwindCheck
{
6
#if __cplusplus >= 201703L
7
int
nofUncaughtExceptions;
8
public
:
9
unwindCheck
(): nofUncaughtExceptions(std::uncaught_exceptions()) {
10
};
11
~unwindCheck
() =
default
;
12
bool
isUnwinding
()
const
{
13
return
std::uncaught_exceptions() > nofUncaughtExceptions;
14
}
15
#else
16
public
:
17
unwindCheck
() =
default
;
18
~unwindCheck
() =
default
;
19
bool
isUnwinding
()
const
{
20
return
std::uncaught_exception();
21
}
22
#endif
23
};
24
25
26
#endif
unwindCheck::isUnwinding
bool isUnwinding() const
Definition:
unwindCheck.h:19
unwindCheck
Definition:
unwindCheck.h:5
unwindCheck::unwindCheck
unwindCheck()=default
unwindCheck::~unwindCheck
~unwindCheck()=default
Generated by
1.8.17