Constructs an AutoResource object from the specified lvalue references to a handle to be managed and to a checker object, with the value-initialized default closer object.
- Parameters
-
refHandle | is an lvalue reference to a resource handle which is to be owned and managed by the created object. |
refChecker | is an lvalue reference to a checker object to be used for checking if a handle managed by the instance of the AutoResource is allowed to be closed. The default class of checkers is a DefaultResourceHandleChecker. |
- Warning
- The checker callable object must not allow the closing of the default constructed handle (i.e. handle_type()).