{"push_id":1338199371,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"11ad8a221609cfc6e0cdbae036a062a45aeed5c5","before":"9069281dc84083d4a034e4fffafc58c5467ebeb1","commits":[{"sha":"450d9f709820a687a05d4bdcb207226902e7b729","author":{"name":"Eric Fiselier","email":"a16fbdd223a71781803acbd9bd107ba1353fc2f0@efcs.ca"},"message":"[libc++] Fix stack_allocator\n\nSummary:\nTo quote STL the problems with stack allocator are\"\n\n>\"stack_allocator<T, N> is seriously nonconformant to N4582 17.6.3.5 [allocator.requirements].\n> First, it lacks a rebinding constructor. (The nested \"struct rebind\" isn't sufficient.)\n> Second, it lacks templated equality/inequality.\n> Third, it completely ignores alignment.\n> Finally, and most severely, the Standard forbids its existence. Allocators are forbidden from returning memory \"inside themselves\". This requirement is implied by the Standard's requirements for rebinding and equality. It's permitted to return memory from a separate buffer object on the stack, though.\"\n\nThis patch attempts to address all of those issues.\n\nFirst, instead of storing the buffer inside the allocator I've change `stack_allocator` to accept the buffer as an argument.\n\nSecond, in order to fix rebinding I changed the parameter list from `<class T, size_t NumElements>` to `<class T, size_t NumBytes>`. This allows allocator rebinding\nbetween types that have different sizes.\n\nThird, I added copy and rebinding constructors and assignment operators.\n\nAnd finally I fixed the allocation logic to always return properly aligned storage.\n\nReviewers: mclow.lists, howard.hinnant, STL_MSFT\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D25154\n\ngit-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283631 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-beanz/llvm-submodules/commits/450d9f709820a687a05d4bdcb207226902e7b729"},{"sha":"11ad8a221609cfc6e0cdbae036a062a45aeed5c5","author":{"name":"Eric Fiselier","email":"a16fbdd223a71781803acbd9bd107ba1353fc2f0@efcs.ca"},"message":"Add missing include in test_allocator.h\n\ngit-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283632 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-beanz/llvm-submodules/commits/11ad8a221609cfc6e0cdbae036a062a45aeed5c5"}]}
{"actor":{"display_login":"llvm-beanz"}}