Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test CustomAllocator debugging configuration fix. #1887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HenrikAkseliValve
Copy link
Contributor

On Windows 2022 "vector" module deconstructor of the vector is the following:

    _CONSTEXPR20 ~vector() noexcept {
        _Tidy();
#if _ITERATOR_DEBUG_LEVEL != 0
        auto&& _Alproxy = _GET_PROXY_ALLOCATOR(_Alty, _Getal());
        _Delete_plain_internal(_Alproxy, _STD exchange(_Mypair._Myval2._Myproxy, nullptr));
#endif // _ITERATOR_DEBUG_LEVEL != 0
    }

When debugging configuration is enabled, internals here report an error for NamespacesDerived.Native.

A fix is to add Constructor and Copy Constructor to the NamespacesDerived.h CustomAllocator. Windows manual seems to want even more to be defined, but I leave it here. https://learn.microsoft.com/en-us/cpp/standard-library/allocators?view=msvc-170

On Windows 2022 "vector" module deconstructor of the `vector` is the following:
```C++
    _CONSTEXPR20 ~vector() noexcept {
        _Tidy();
#if _ITERATOR_DEBUG_LEVEL != 0
        auto&& _Alproxy = _GET_PROXY_ALLOCATOR(_Alty, _Getal());
        _Delete_plain_internal(_Alproxy, _STD exchange(_Mypair._Myval2._Myproxy, nullptr));
#endif // _ITERATOR_DEBUG_LEVEL != 0
    }
```

When debugging configuration is enabled, internals here report an error for NamespacesDerived.Native.

A fix is to add Constructor and Copy Constructor to the NamespacesDerived.h `CustomAllocator`.
Windows manual seems to want even more to be defined, but I leave it here.
https://learn.microsoft.com/en-us/cpp/standard-library/allocators?view=msvc-170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants