Changeset 1b65595 for src/Common
- Timestamp:
- Sep 14, 2022, 4:34:42 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- a9762dc
- Parents:
- 3acc863
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r3acc863 r1b65595 322 322 323 323 ValueGuardPtr(T * inRef) : old( inRef ? *inRef : T() ), ref(inRef) {} 324 ValueGuardPtr(const ValueGuardPtr& other) = delete; 325 ValueGuardPtr(ValueGuardPtr&& other) : old(other.old), ref(other.ref) { other.ref = nullptr; } 324 326 ~ValueGuardPtr() { if( ref ) *ref = old; } 325 327 };
Note: See TracChangeset
for help on using the changeset viewer.