Re: Why the following SFINAE test does not work?
{ Attributions added for quotes; line breaks fixed; "..." ellipses removed from
URL; URL tested; short URL added. Elias, and others, please take some care with
the *form* of your contentwise very good articles -- so that they communicate
even better. TIA., -mod/aps }
* Daniel Kr?gler, on 13.11.2010 04:00:
* Am 11.11.2010 18:30, schrieb Andy Venikov:
This should be well-formed, and the OP's example should be so as well.
This produces an error that says that the compiler couldn't chose the
right apply among the overloads.
IMO this is a compiler-defect.
Could you please indicate the relevant standard sections? I am
planning to file a bug report.
I've eventually implemented some of the ideas provided by Andy's links
(thank you). The OP's solution, whether compliant or not was so much
easier than the lenghtier one I've obtained, which can be seen in a well-
formatted manner at
http://stackoverflow.com/questions/4136359/why-cannot-the-following-sfinae-test-detect-a-template-member-function/4173368#4173368
{ short url <url: http://preview.tinyurl.com/3ysrrnw>. -mod }
It is worth to remark that the test in the link above is a different
one from the OP's code. The test implemented in the link returns true
whenever some call is possible for a member function, while the OP's should
result true if an exact signature is match. So th OP's test should still be
useful in some situations.
Elias
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]