https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103110
Bug ID: 103110 Summary: templated operator auto is ignored Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This code should be valid: ``` struct S { template<class=void> operator auto() const { return 2; } }; int main() { S s; [[maybe_unused]] int d = s; } ``` and Clang accepts it, while GCC does not. Demo: https://gcc.godbolt.org/z/rMK4zboEd