mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-31 10:34:17 +00:00
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:
parent
a2fa271b36
commit
3da7647d69
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user