• Nathan Bronson's avatar
    F14 enable trivial object optimizations for custom allocators · 8dfae42b
    Nathan Bronson authored
    Summary:
    F14 can apply some additional optimizations for trivially
    copyable and trivially destructible values in the case that the allocator
    doesn't do anything special in its construct and destroy methods.
    Previously this was gated based on whether the allocator was exactly
    std::allocator, but that causes this optimization to be missed in some
    important cases.  This diff extends the checking machinery to test if
    there is actually a default construct or destroy method in the allocator
    (they are optional) and to test if there is a manual override of the
    conservative default check.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D8191437
    
    fbshipit-source-id: c55b8f32427c3f0eff5c8ef42d7b51a57b0cbd1f
    8dfae42b
Memory.h 19.5 KB