Skip to content

<xnode_handle.h>: values should be destroyed with value_type allocator #1309

@Kamichanw

Description

@Kamichanw

for example, in the function _Clear

void _Clear() noexcept { // destroy any contained node and return to the empty state
if (_Ptr) {
_Alloc& _Al = _Getal();
_Alnode _Node_alloc{_Al};
_Alnode_traits::destroy(_Node_alloc, _STD addressof(_Ptr->_Myval));
_Node::_Freenode0(_Node_alloc, _Ptr);
_Destroy_in_place(_Al);
_Ptr = nullptr;
}
}

why uses node allocator traits(_Alnode_traits) to destroy _Ptr->_Myval? I think it should be made by value allocator traits(_Alty_traits). All of value destructions have this problem.

Also tracked by DevCom-1190997 and Microsoft-internal VSO-1217757 / AB#1217757 .

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