Repository navigation
Built-in operator!= reported ambiguous when the operand converts through different conversion functions #250
danieljennings
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
EDG rejects
h != pas ambiguous whenhhas bothoperator A*()andoperator const void*()andpis aconst A*. The two conversions go through different conversion functions, so per[over.ics.rank]/3.3neither is better forh, and the exact match onpshould makeoperator!=(const A*, const A*)the best candidate, as GCC, Clang and MSVC agree.Reproducing Source Code
Command-line Options
cpfe --c++20 test.cpp
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
(
--c++17also repros it)Demonstration that EDG disagrees with Clang/MSVC/GCC: https://godbolt.org/z/onesYfexc
I don't know the EDG configuration that applies to VS2026 Intellisense, but it also repros the problem.
Reproducing (Standard) Configuration(s)
linux-clang-release, windows-msvc-release
Reproducing (Non-standard) Configuration
No response
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions