Created
April 19, 2014 01:26
-
-
Save pervognsen/11070807 to your computer and use it in GitHub Desktop.
blah.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename C, typename D, typename... Args> | |
auto make_resource(C constructor, D destructor, Args&&... args) | |
{ | |
return std::make_unique_ptr(constructor(std::forward<Args>(args)...), destructor); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment