|
LibSWOC++ 1.5.14
Solid Wall of C++
|
#include <swoc_meta.h>

Public Types | |
| using | self_type = let |
Public Member Functions | |
| let (self_type const &that)=delete | |
| self_type & | operator= (self_type const &)=delete |
| let (T &var, T const &value) | |
| let (T &var, T &&value) | |
Public Attributes | |
| T & | _var |
| Reference to scoped variable. | |
| T | _value |
| Original value. | |
Scoped value change.
The purpose of this class is to change the value of a variable in a scope and then change it back when the scope is exited. The old value will be moved to a cache variable and then moved back when the instance is destructed. This is very useful to temporarily tweak global variables which having to know what the current value is.
| T | Type of variable to scope. |
Definition at line 257 of file swoc_meta.h.
| using swoc::meta::let< T >::self_type = let |
Definition at line 258 of file swoc_meta.h.
| swoc::meta::let< T >::let | ( | T & | var, |
| T const & | value ) |
Construct a scope.
| var | Variable to scope. |
| value | temporary value to assign. |
Definition at line 283 of file swoc_meta.h.
| swoc::meta::let< T >::let | ( | T & | var, |
| T && | value ) |
Construct a scope.
| var | Variable to scope. |
| value | temporary value to assign. |
Definition at line 286 of file swoc_meta.h.
| swoc::meta::let< T >::~let | ( | ) |
Definition at line 290 of file swoc_meta.h.
| T swoc::meta::let< T >::_value |
Original value.
Definition at line 264 of file swoc_meta.h.
| T& swoc::meta::let< T >::_var |
Reference to scoped variable.
Definition at line 263 of file swoc_meta.h.