------- Comment #30 from paolo dot carlini at oracle dot com 2009-12-18 00:58 ------- I agree. In general, however, I'm not sure how general the issue is, now that concepts are gone. For example, consider the case of the various classification functions (from C99): you can still find a PR filed by Howard a lot of time ago, where he complained that we weren't restricting the templates and that could cause problems with some user functions, which arguably were not supposed to conflict with those C99 extensions (in strict C++03 mode). Thus we added the enable_ifs. Now, if you look at the WP, those use just unrestricted templates and indeed user functions can be affected, similarly to next and prev. Outside the few places in the WP where the famous "does not participate to overload resolution" is used, there are in my opinion far too many grey areas where, missing real concepts, some sort of restriction is supposed to be enforced for QoI to counteract the obnoxious ADL problems, without however stating that clearly anywhere: if you talk to Howard he more or less assumes by default, irrespective of the actual WP, that all the templates in the library are somewhat restricted via enable_ifs, for instance all the mathematical functions for arithmetic types only, etc, otherwise the users can complain *rightfully* about ADL-caused problems at any time. Well, I'm not sure that is correct, I don't think the library has necessarily to battle this futile war against ADL ;) with tons of enable_ifs even where the standard definitely does not say that explicitly. To finish, a remark is in order about the *tough* cases, like *iterator* exactly, where you can't really replace concepts, via SFINAE & co, for the reasons which we just discussed. What should the standard say? Should it try to do better than C++03 now that we know about enable_if and extended SFINAE, etc, or not, in the famous futile war with ADL?
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40497