Refactor is_simple_allocator and callers
authorYedidya Feldblum <yfeldblum@fb.com>
Thu, 2 Nov 2017 16:55:29 +0000 (09:55 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 2 Nov 2017 17:19:05 +0000 (10:19 -0700)
commit723d4d3fe6884f9a5057f2057c2a9a6dbc1e3f9a
tree567af0dbc8363e5dcba34aa572ec95e79e5572f9
parent1bdec475acac176a9692b6e506564c8c0ccd1984
Refactor is_simple_allocator and callers

Summary:
[Folly] Refactor `is_simple_allocator` and callers.

* Swap order of template parameters.
* Do decaying in the callers instead.
* Do a direct invocability test, rather than an indirect test of whether the allocator has a method `destroy` with the expected signature.

Reviewed By: ericniebler

Differential Revision: D6184062

fbshipit-source-id: aec32e6e323b8c6023b94c258ab2bcddd8c53e09
folly/Memory.h
folly/test/ArenaSmartPtrTest.cpp