https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87464

Alex <alexejfink at gmx dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #3 from Alex <alexejfink at gmx dot net> ---
Hello,

I am sorry for the confusion. With "works" I did not mention the clang & VC
compile the example -- of course the lines commended as "expected error" do not
compile and shall not compile.

The issue here is not "not compiling", but the wrong/misleading error reporting
of GCC, especially compared to those of clang & VC. GCC reports a substitution
failure at line 27 & 36 as hard error, what according to the SFINAE concept is
not.

The extra hard error report at those lines is misleading and could direct a c++
newbie into wrong direction: to repair this issue by "fixing" the enable_if
guards.

The clang and VC report a "note" for those lines, which is the better way,
IMHO.

best regards,
Alex

Reply via email to