| 56 | */ |
| 57 | template<typename Function, typename Deleter, typename ... Arguments> |
| 58 | auto unique_rsc(Function&& function, Deleter&& deleter, Arguments&& ... args) |
| 59 | { |
| 60 | using A = std::remove_pointer_t<std::result_of_t<Function(Arguments &&...)>>; |
| 61 | using B = std::decay_t<Deleter>; |
| 62 | |
| 63 | return std::unique_ptr<A, B>(function(std::forward<Arguments>(args)...), |
| 64 | std::forward<Deleter>(deleter)); |
| 65 | } |
| 66 | |
| 67 | /* |
| 68 | * This function takes a type,a deleter for the type and optional arguments the |
no outgoing calls
no test coverage detected