Constructs an AutoResource object from lvalue handle and closer as well as an rvalue checker. The closer and the checker are to be used to close the handle and to check allowance for the closing respectively.
- Parameters
-
refHandle | is an lvalue reference to a resource handle which is to be owned and managed by the created object. |
refCloser | is an lvalue reference to a closer object to be 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()).