https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104567
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Known to fail| |4.1.2, 4.6.4 Last reconfirmed| |2022-02-16 Summary|SFINAE check failure |SFINAE check failure with |starting gcc 4.7.1 and up |trying to access member |with -std=c++11 |field --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Actually it has always failed. Here is a C++98 testcase which shows the issue even with GCC 4.1.2: template <typename _TAny, char const* value = _TAny::param> bool has_char_static_param(int) { return true; } template <typename _TAny> bool has_char_static_param(...) { return false; } struct checked_type { int param; }; int main() { int t = has_char_static_param<checked_type>(0); return t; }