Skip to content

<memory_resource>: std::pmr::polymorphic_allocator<T>::destroy missing #753

@jmlundberg

Description

@jmlundberg

https://en.cppreference.com/w/cpp/memory/polymorphic_allocator/destroy
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4713.pdf §23.12.3.2 #14
Seems to be missing.
https://github.com/microsoft/STL/blob/master/stl/inc/xpolymorphic_allocator.h#L190
https://godbolt.org/z/iFfpPT

I had expected something like:

    template<class _Ty>
    void destroy(_Ty* _Ptr) {
        // destroys _Ptr as if by _Ptr->~_Ty().
        _Ptr->~_Ty();
    }

If this is indeed so, I can provide a PR.

Also tracked by DevCom-394908 and Microsoft-internal VSO-737704 / AB#737704.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions