This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51710] decltype and SFINAE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51710

--- Comment #3 from Yuriy Solodkyy <solodon at mail dot com> 2012-01-02 21:35:56 UTC ---
Thank you, I am aware of the workaround and that is exactly what I do in my
code, however I think the current behavior is counter intuitive:

1. I get error message about instantiation that I have not made myself in the
code or expected to be made, but because compiler had failure during
substitution in decltype.

2. The error message is missing the instantiation context as in regular cases,
which made me wonder for a long time what exactly fails and why, especially
since Visual C++ was doing what I expected.

3. The purpose of decltype is now less clear as for each such case I cannot
just use decltype, but have to create a dedicated meta-function again, that
uses the decltype inside.

4. Once the concept based overloading is there, I expect the function be thrown
out of the overload set because the types don't match the concept emulated here
with condition. There won't be compilation error then and with this code I am
simply trying to emulate the concept-based overloading with tools i have today.

Thank you,
Yuriy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]