X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FMemory.h;h=0b6c0a11c333678caaf3b4de01f55e90436f21e2;hb=2624a682280830b932a741c5386b58b4771b4f5e;hp=e4db242ba22edc24065a249e67bc5416f47944b3;hpb=36b366265da55fc26201870d1c5c2477ccc12600;p=folly.git diff --git a/folly/Memory.h b/folly/Memory.h index e4db242b..0b6c0a11 100644 --- a/folly/Memory.h +++ b/folly/Memory.h @@ -169,6 +169,18 @@ class StlAllocator { Alloc* alloc_; }; +/** + * Helper function to obtain rebound allocators + * + * @author: Marcelo Juchem + */ +template +typename Allocator::template rebind::other rebind_allocator( + Allocator const &allocator +) { + return typename Allocator::template rebind::other(allocator); +} + /* * Helper classes/functions for creating a unique_ptr using a custom allocator *