Add a trivial functor for use with unique_ptrs managing memory that needs to be freed rather than deleted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216790 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-08-29 22:05:31 +00:00
parent a2fa271b36
commit 3da7647d69

View File

@ -530,6 +530,12 @@ make_unique(size_t n) {
#endif
struct FreeDeleter {
void operator()(void* v) {
::free(v);
}
};
template<typename First, typename Second>
struct pair_hash {
size_t operator()(const std::pair<First, Second> &P) const {