Default constructible folly::SysArenaAllocator
Summary: Adjust `CxxAllocatorAdaptor` such that it becomes default constructible. This makes `SysArenaAllocator` default constructible too, which makes it much easier to use. A default-constructed `SysArenaAllocator` is not useful at all. Any attempt to allocate just throws `std::bad_alloc`. But it makes it possible to at least compile code like this: ``` using MyAlloc = SysArenaAllocator<char>; struct Foo { Foo() = default; // BOOM Foo(MyAlloc &a) : v(a) {}; vector<int, MyAlloc> v; } ``` Reviewed By: yfeldblum Differential Revision: D21967640 fbshipit-source-id: 5b74c6db14d75364b374cad71d0069b17769e5d6
Showing
Please register or sign in to comment