chsvlib
chsv helper source code

◆ get()

const handle_noref& get ( ) const

Returns a reference to an owned handle. The caller can call the get_checker()(get()) to verify validity of the returned handle. If verification fails the AutoResource object is assumed to own nothing.

Remarks
Notice that a call to this function does not make AutoResource release ownership of the handle (i.e., it is still responsible for closing the managed resource at some point). Therefore, the value returned by this function shall not be used to construct a new managed handle. In order to obtain the stored handle and release ownership over it, call AutoResource::release instead.