libwreport
3.10
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
wreport
options.h
Go to the documentation of this file.
1
#ifndef WREPORT_OPTIONS_H
2
#define WREPORT_OPTIONS_H
3
20
namespace
wreport {
21
namespace
options {
22
29
extern
thread_local
bool
var_silent_domain_errors;
30
46
template
<
typename
T>
47
struct
LocalOverride
48
{
49
T old_value;
50
T& param;
51
52
LocalOverride
(T& param,
const
T& new_value)
53
: old_value(param), param(param)
54
{
55
param = new_value;
56
}
57
~
LocalOverride
()
58
{
59
param = old_value;
60
}
61
};
62
63
template
<
typename
T>
static
inline
LocalOverride<T>
local_override(T& param,
const
T& new_value)
64
{
65
return
LocalOverride<T>
(param, new_value);
66
}
67
68
}
69
}
70
71
#endif
wreport::options::LocalOverride
Temporarily override a variable while this object is in scope.
Definition:
options.h:47
Generated on Thu Mar 8 2018 15:48:07 for libwreport by
1.8.5