Open steverobb opened 2 years ago
void test(const int&); // 1 void test(volatile int&); // 2 struct X { operator volatile int&() const; }; void func(const X& x) { test(x); }
I don't believe 1 should ever be considered viable during overload resolution, yet Clang will error, claiming that overloads 1 and 2 are both viable candidates. Deleting 2 causes the compiler to correctly reject 1 as it would lose qualifiers.
1
2
@llvm/issue-subscribers-clang-frontend
I don't believe
1
should ever be considered viable during overload resolution, yet Clang will error, claiming that overloads1
and2
are both viable candidates. Deleting2
causes the compiler to correctly reject1
as it would lose qualifiers.