Constructs an AutoResource object from an rvalues of a handle to be managed as well as rvalues of a closer and a checker using move semantics. The handle will be managed by the created object using the closer and the checker to close the handle and to get permission for it respectively.
- Parameters
-
rrefHandle | is an rvalue reference to a resource handle which is to be owned and managed by the created object. |
rrefCloser | is an rvalue reference to a closer object passed using move semantics and used for closing handles owned and managed by the created instance of the AutoResource. |
rrefChecker | is an rvalue reference to a checker object to be used to check if a managed handle is allowed to be closed by the closer. |
- Warning
- The checker callable object must not allow the closing of the default constructed handle (i.e. handle_type()).