From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14495 invoked by alias); 2 Nov 2012 08:57:52 -0000 Received: (qmail 14471 invoked by uid 48); 2 Nov 2012 08:57:33 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55159] pythy constexpr auto lambda pointer has no initializer Date: Fri, 02 Nov 2012 08:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail 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: In-Reply-To: References: 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-11/txt/msg00122.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55159 --- Comment #5 from Daniel Kr=C3=BCgler 2012-11-02 08:57:33 UTC --- I need to insert another correction. My attempt to simplify the reporters b= ug failed because I was mislead by the report description that "visual studio = 2012 work fine" interpreting this to mean the Microsoft Visual Studio 2012 compi= ler. But that one does not understand 'constexpr' therefore my reduction to 'con= st' was not equivalent. (In reply to comment #1) > I really think that Pythy should fix this implementation, because it is n= ot > supported by the C++11 standard. Any compiler accepting that is defect. This statement still holds. The original code is not conforming. The following presents a conforming code that reproduces the problem: template struct min_t { static bool less(T0 x, T1 y) { return x < y ? x : y; } constexpr static auto* f =3D &less; // #5 }; min_t mi; // #8 "8| required from here| 5|error: declaration of 'constexpr auto* const min_t::f' has no initializer" Please ignore the part about const T in template deduction. This is a diffe= rent issue and not related to this one.