Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Fix std::allocator traits #1518

Merged

Conversation

gevtushenko
Copy link
Collaborator

This PR fixes the following issue.

SFINAE doesn't allow us to specialize code depending on the deprecation attribute. Therefore existing allocator_traits led to deprecated fields accesses. In this PR I explicitly specialized __THRUST_DEFINE_HAS_NESTED_TYPE for std::allocator in case of C++ >= 17.

@gevtushenko
Copy link
Collaborator Author

run tests

@gevtushenko gevtushenko force-pushed the main-bug/github/msvc_std_allocator branch from 8f17c03 to 926f092 Compare September 8, 2021 19:05
@gevtushenko gevtushenko force-pushed the main-bug/github/msvc_std_allocator branch from 926f092 to b822b8d Compare September 8, 2021 19:08
@gevtushenko
Copy link
Collaborator Author

run tests

@alliepiper alliepiper added this to the 1.15.0 milestone Sep 13, 2021
@alliepiper
Copy link
Collaborator

LGTM, I tested this locally and it seems to work. Just run it through DVS and if it looks good, go ahead and merge it 👍

@alliepiper alliepiper added the P0: must have Absolutely necessary. Critical issue, major blocker, etc. label Sep 13, 2021
@gevtushenko gevtushenko force-pushed the main-bug/github/msvc_std_allocator branch from b822b8d to c545f0a Compare September 23, 2021 14:08
@gevtushenko gevtushenko force-pushed the main-bug/github/msvc_std_allocator branch from c545f0a to a9d907f Compare September 23, 2021 14:10
@gevtushenko gevtushenko merged commit 9af3392 into NVIDIA:main Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P0: must have Absolutely necessary. Critical issue, major blocker, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std::allocator functions and typedefs deprecated in C++17
2 participants