From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30146 invoked by alias); 1 Nov 2012 15:12:10 -0000 Received: (qmail 29920 invoked by uid 48); 1 Nov 2012 15:11:51 -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: Thu, 01 Nov 2012 15:12: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/msg00048.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55159 --- Comment #3 from Daniel Kr=C3=BCgler 2012-11-01 15:11:51 UTC --- (In reply to comment #2) Hmmh, it doesn't look like that one, maybe I was wrong about an existing is= sue. But it seems that gcc doesn't ignore the const (in "const T*" or "const aut= o*") for functions here, which seems to be the root of the second problem (This = is *not* attempting to form a function with cv-qualifier-seq). Both template T* addr(T& t) { return &t; } bool less(int x, int y) { return x < y ? x : y; } static auto* f =3D addr(less); and template T* addr(T& t) { return &t; } bool less(int x, int y) { return x < y ? x : y; } template int deduce(T*) { return 0; } int i =3D deduce(addr(less)); are accepted as they should.