![]() |
boost::scope::make_unique_resource_checked — Checks if the resource is valid and creates a unique_resource
wrapper.
// In header: <boost/scope/unique_resource.hpp> template<typename Resource, typename Deleter, typename Invalid = typename std::decay< Resource >::type> unique_resource< typename std::decay< Resource >::type, typename std::decay< Deleter >::type > make_unique_resource_checked(Resource && res, Invalid const & invalid, Deleter && del);
Effects: If the resource res is not equal to invalid, creates a unique resource wrapper that is in allocated state and owns res. Otherwise creates a unique resource wrapper in unallocated state.
![]() |
Note |
---|---|
This function does not call del if res is equal to invalid. |
Throws: Nothing, unless unique_resource
constructor throws.
Parameters: |
|