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

Qualify calls to make_reverse_iterator #1347

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

dkolsen-pgi
Copy link
Collaborator

Unqualified calls to make_reverse_iterator would result in ADL ambiguities between std::make_reverse_iterator and thrust::make_reverse_iterator when compiling in C++14 mode and the iterator argument is a std::vector<T>::iterator or other std type. Fix the problem and avoid ADL by changing the call to the qualified name thrust::make_reverse_iterator.

This was discovered in a parallel algorithms test suite for NVC++, when we recently changed the test suite to sometimes compile in C++14 mode. std::make_reverse_iterator is new to C++14, so the bug doesn't happen when building in C++11 mode.

Unqualified calls to make_reverse_iterator would result in ADL ambiguities
between std::make_reverse_iterator and thrust::make_reverse_iterator when
the iterator argument is a std::vector<T>::iterator or other "std" type.
Fix the problem and avoid ADL by changing the call to the qualified name
thrust::make_reverse_iterator.
@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

@alliepiper
Copy link
Collaborator

LGTM, DVS CL 29385928

@alliepiper alliepiper added testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). testing: gpuCI in progress Started gpuCI testing. labels Dec 3, 2020
@alliepiper alliepiper added this to the 1.12.0 milestone Dec 3, 2020
@alliepiper alliepiper self-assigned this Dec 3, 2020
@alliepiper alliepiper added testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS). and removed testing: gpuCI in progress Started gpuCI testing. testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). labels Dec 4, 2020
@alliepiper alliepiper merged commit 79dd763 into main Dec 4, 2020
@alliepiper alliepiper deleted the bug/adl-make_reverse_iterator branch December 4, 2020 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants