From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B24123858C20; Wed, 16 Feb 2022 14:45:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B24123858C20 From: "armenchik at mail dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104567] New: SFINAE check failure starting gcc 4.7.1 and up with -std=c++11 Date: Wed, 16 Feb 2022 14:45:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: armenchik at mail dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2022 14:45:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104567 Bug ID: 104567 Summary: SFINAE check failure starting gcc 4.7.1 and up with -std=3Dc++11 Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: armenchik at mail dot ru Target Milestone: --- template constexpr bool has_char_static_param(int) { return true; } template constexpr bool has_char_static_param(...) { return false; } struct checked_type { constexpr static char param[] =3D "param"; // <- everything works fine //constexpr static int param =3D 0; // <- sfinae works fine, fails stat= ic assert //int param; // <- sfinae fails! reporting error during param substitut= ion //char const* param; // <- sfinae fails again as above }; int main() { static_assert(has_char_static_param(0), "check failed"); return 0; }=