Searched defs:SaveAndRestore (Results 1 – 3 of 3) sorted by relevance
22 template <typename T> struct SaveAndRestore { struct23 SaveAndRestore(T &X) : X(X), OldValue(X) {} in SaveAndRestore() function24 SaveAndRestore(T &X, const T &NewValue) : X(X), OldValue(X) { in SaveAndRestore() function27 ~SaveAndRestore() { X = OldValue; } in ~SaveAndRestore() argument28 T get() { return OldValue; } in get()32 T OldValue;
22 template <typename T> struct SaveAndRestore { struct23 SaveAndRestore(T &X) : X(X), OldValue(X) {} in SaveAndRestore() function24 SaveAndRestore(T &X, const T &NewValue) : X(X), OldValue(X) { in SaveAndRestore() argument27 ~SaveAndRestore() { X = OldValue; } in ~SaveAndRestore() argument35 /// Similar to \c SaveAndRestore. Operates only on bools; the old value of a argument
133 TEST(ErrTest, SaveAndRestore) { in TEST() argument