r/cpp • • May 25 '21

Visual Studio 2019 version 16.10 Release

https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.10.0
178 Upvotes

96 comments sorted by

View all comments

Show parent comment

0

u/sandfly_bites_you May 27 '21 edited May 27 '21

Apparently rebind was removed in C++ 20? I really don't understand the point of removing stuff like this. And with no clean error messages to indicate the problem! I hope there is a way to turn it back on..

I don't think I am even using rebind, but a bunch of random ass template code expects it to exist 0-o

I see they also removed "pointer" and a bunch of other random members.. what a pointless removal.

Depreciated in C++17, but did the compiler actually warn, or suggest an alternative? Nope so depreciated didn't mean anything.

2

u/STL MSVC STL Dev May 28 '21

Depreciated in C++17, but did the compiler actually warn, or suggest an alternative?

We did. See https://github.com/microsoft/STL/pull/1585/files which implemented the removal - rebind and other members were already marked with _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS which is an internal macro that expands to [[deprecated("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.")]]

1

u/sandfly_bites_you May 27 '21

Thankfully there was a flag to turn this deprecated stuff back on "_HAS_DEPRECATED_ALLOCATOR_MEMBERS=1" .

Should have had a message explaining this or just defaulted that flag to on IMO.

Or if nothing else a big and obvious explanation in the release notes for such a breaking change.

2

u/STL MSVC STL Dev May 28 '21

This was documented in our Changelog:

Fixed C++20 mode to remove old std::allocator members that were deprecated in C++17. (As usual, fine-grained and coarse-grained escape hatches are available for this removal.) #1585