Use C++14 decay_t (#6454)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
This commit is contained in:
parent
46e56ca6fc
commit
d26fccaa44
|
|
@ -46,8 +46,7 @@ class V3ThreadPool;
|
|||
/// Save a given variable's value on the stack, restoring it at end-of-scope.
|
||||
// Object must be named, or it will not persist until end-of-scope.
|
||||
// Constructor needs () or GCC 4.8 false warning.
|
||||
#define VL_RESTORER(var) \
|
||||
const VRestorer<typename std::decay<decltype(var)>::type> restorer_##var(var);
|
||||
#define VL_RESTORER(var) const VRestorer<typename std::decay_t<decltype(var)>> restorer_##var(var);
|
||||
/// Get the copy of the variable previously saved by VL_RESTORER()
|
||||
#define VL_RESTORER_PREV(var) restorer_##var.saved()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue