From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5136 invoked by alias); 8 Oct 2012 17:05:09 -0000 Received: (qmail 4352 invoked by uid 48); 8 Oct 2012 17:04:23 -0000 From: "leonid at volnitsky dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54859] New: constexpr in template aliase rejected as non-constant Date: Mon, 08 Oct 2012 17:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: leonid at volnitsky dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00712.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54859 Bug #: 54859 Summary: constexpr in template aliase rejected as non-constant Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: leonid@volnitsky.com clang-3.2 and gcc-4.7.2 compiles, gcc-4.8 rejects: -------------------------------------------------------------------------- // enbale_if=20 template =20=20=20=20 struct enable_if { typedef T type; };=20 template =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 struct enable_if {}; // template alias template=20 using eIF =3D typename enable_if ::type; // f - this compiles template=20 typename enable_if::type f() { return 20; } // ff - error: integral expression =E2=80=98! B=E2=80=99 is not constant=20 template=20 eIF ff() { return 20; } int main() {} ---------------------------------------------------------------------------= =20 This seams to be related to bug 54648, where I found bad commit to be 1914= 12