boostorg / core

Boost Core Utilities
132 stars 86 forks source link

Warning from msvc-14.1 in boost/core/allocator_access.hpp #75

Closed HDembinski closed 4 years ago

HDembinski commented 4 years ago

This new warning was introduced on develop (breaking Boost Histogram CI tests):

C:\projects\boost\boost/core/allocator_access.hpp(453): warning C4996: 'std::allocator<T>::destroy': warning STL4010: Various members of std::allocator are deprecated in C++17. Use std::allocator_traits instead of accessing these members directly. You can define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
glenfe commented 4 years ago

@HDembinski thanks; fixed in develop. We only used the members if we detect their existence, but MSVC 14.1 in /std:c++-latest provides the deprecated members on std::allocator but warns when they're used. So it needed a specific workaround.

HDembinski commented 4 years ago

Thank you for the quick fix!

daira commented 3 years ago

This also occurs on clang 11: https://github.com/zcash/zcash/pull/4951/commits/fa41e9adca9a485cd885ef08d636ab4930e4699c

glenfe commented 3 years ago

@daira This should be addressed in the next (1.76) release: 86bff4c2d381c1832b6ff61fabe90635ff91d9fc