Skip to content

Conversation

CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Jun 15, 2021

EDG reported that basic_common_reference<T, U> is ambiguous when both T and U are specializations of test::proxy_reference, as occurs in P0896R4_ranges_alg_equal. Apparently both MSVC and Clang share the same bug here (See LLVM-50723) and pick a specialization to make this work.

I've verified that cl /BE compiles P0896R4_ranges_alg_equal successfully with this change (by temporarily hacking concepts_20_matrix.lst and yvals_core.h).

EDG reported that `basic_common_reference<T, U>` is ambiguous when both `T` and `U` are specializations of `test::proxy_reference`, as occurs in `P0896R4_ranges_alg_equal`. Apparently both MSVC and Clang share the same bug here and pick a specialization to make this work.

I've verified that `cl /BE` compiles `P0896R4_ranges_alg_equal` successfully with this change (by temporarily hacking `concepts_20_matrix.lst` and `yvals_core.h`).
@CaseyCarter CaseyCarter added test Related to test code ranges C++20/23 ranges labels Jun 15, 2021
@CaseyCarter CaseyCarter requested a review from a team as a code owner June 15, 2021 22:33
@barcharcraz barcharcraz self-assigned this Jun 16, 2021
@CaseyCarter

This comment has been minimized.

@StephanTLavavej StephanTLavavej self-assigned this Jun 24, 2021
@StephanTLavavej StephanTLavavej merged commit 5566b64 into microsoft:main Jun 29, 2021
@StephanTLavavej
Copy link
Member

Thanks for investigating and fixing this! It's always amusing to see independently-developed compilers end up with the same bugs. 😹 🪲 🪲

@CaseyCarter CaseyCarter deleted the edgbug branch June 29, 2021 23:20
@CaseyCarter
Copy link
Contributor Author

For posterity: the corresponding MSVC bug is VSO-1343148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ranges C++20/23 ranges test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants