[Bug c++/115216] operator auto() gets instantiatied too eagerly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115216 --- Comment #3 from Olaf Krzikalla --- (In reply to Andrew Pinski from comment #2) > MSVC and ICC (EDG in GCC compat mode) also rejects the code for the same > reason as GCC. Are you sure this is not a clang issue? To be honest I don't know. I have no idea, if a compiler is allowed to convert a type before applying a operator, if there is already such an operator available in the genuine class. Someone who knows the respective details in the standard is required.
[Bug c++/115216] operator auto() gets instantiatied too eagerly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115216 --- Comment #2 from Andrew Pinski --- MSVC and ICC (EDG in GCC compat mode) also rejects the code for the same reason as GCC. Are you sure this is not a clang issue?
[Bug c++/115216] operator auto() gets instantiatied too eagerly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115216 --- Comment #1 from Andrew Pinski --- Created attachment 58281 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58281&action=edit testcase Next time please attach the testcase or place it inline rather than just a link to godbolt.