Boost C++ Libraries: Ticket #11414: minor problem in libs/pool/example/sys_allocator.hpp https://svn.boost.org/trac10/ticket/11414 <p> In sys_allocator.hpp the struct new_delete_allocator has a minor issue. </p> <p> The code is: </p> <blockquote> <p> static pointer allocate(const size_type n, const void* = 0) { return (pointer) new char[n * sizeof(T)]; } static void deallocate(const pointer p, const size_type) { delete [] p; } </p> </blockquote> <p> Note that the deallocate member function calls array delete, but the allocate function does not call array new. According to the standard this is invalid. </p> <p> The HP <a class="missing wiki">NonStop</a> runtime will generate an assert failure on the call to the delete. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11414 Trac 1.4.3 viboes Sun, 05 Jul 2015 22:46:41 GMT component changed; owner set https://svn.boost.org/trac10/ticket/11414#comment:1 https://svn.boost.org/trac10/ticket/11414#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Chris Newbold</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">pool</span> </li> </ul> Ticket