From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14432 invoked by alias); 1 Nov 2012 00:33:43 -0000 Received: (qmail 14386 invoked by uid 48); 1 Nov 2012 00:33:28 -0000 From: "supercilious.dude at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55159] New: pythy constexpr auto lambda pointer has no initializer Date: Thu, 01 Nov 2012 00:33: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: supercilious.dude at gmail 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" 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/msg00004.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55159 Bug #: 55159 Summary: pythy constexpr auto lambda pointer has no initializer Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: supercilious.dude@gmail.com Pythy (http://pfultz2.github.com/Pythy/) does something akin to: template typename std::remove_reference::type *addr(T &&t) { return &t; } template struct min_t { constexpr static auto *f = false ? addr([](T0 x, T1 y){ return x < y ? x : y; }) : nullptr; }; Which gcc (4.7.2 and 4.8.0 git master) cannot evaluate. clang and visual studio 2012 work fine. I know this is not strictly needed by gcc 4.8 since it has deduced auto without the late specifier (which the other compilers lack), but its highly convenient to have pythy work on all c++11 compilers.