From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF18E385C426; Thu, 16 Apr 2020 16:07:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF18E385C426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587053252; bh=64pPnlCMszcZIAxly/uVW/9oKe813UIrRiMi9Wo1hQQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cMBL4VCffmXRtY9/45d5Fpd1C+SpO4JqlSWQnV78w/vLyy1moWuBDlC7mhq//vX5M mFs4C+B0bkX2j5cUyPD5C8PtlSW5kZ29DIwQKpIfRd86b1bjcpKu7hmeL4ec9ZBh7V msgO4R52BU5suVXh6VMH9TQ+3qJ2WmRI7nZlRweM= From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94619] String literals as non-type template parameter fails to compile with partial specialization of calling function Date: Thu, 16 Apr 2020 16:07:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com 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: cc Message-ID: In-Reply-To: References: 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: Thu, 16 Apr 2020 16:07:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94619 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Kr=C3=BCgler --- The non-void return expression in the void bar function makes the example ill-formed regardless of the other problem, so let's fix that first: >>>>>>>>>>>>>> template struct A { char str [length]; constexpr A(char const (&s) [length]) { for (unsigned i =3D 0; i < length; ++i) str[i] =3D s[i]; } }; template struct B { auto bar() const { return a.str; } }; //template void fu (T const& t) // Compiles successfully template void fu (B const& t) // Does not compile //template void fu (B> const& t) // Does not compile eith= er { t.bar(); } void test() { B<":/"> m; fu(m); } >>>>>>>>>>>>>>>>>>=