public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "supercilious.dude at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-55159-4@http.gcc.gnu.org/bugzilla/> (raw)


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 T> 
typename std::remove_reference<T>::type *addr(T &&t) 
{ 
    return &t; 
}

template <class T0, class T1>
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.


             reply	other threads:[~2012-11-01  0:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01  0:33 supercilious.dude at gmail dot com [this message]
2012-11-01 10:58 ` [Bug c++/55159] " daniel.kruegler at googlemail dot com
2012-11-01 14:26 ` paolo.carlini at oracle dot com
2012-11-01 15:12 ` daniel.kruegler at googlemail dot com
2012-11-02  8:10 ` daniel.kruegler at googlemail dot com
2012-11-02  8:57 ` daniel.kruegler at googlemail dot com
2012-11-02 11:15 ` paolo.carlini at oracle dot com
2012-11-02 11:39 ` daniel.kruegler at googlemail dot com
2012-11-02 11:49 ` paolo.carlini at oracle dot com
2012-11-07 15:42 ` paolo.carlini at oracle dot com
2012-11-07 16:12 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55159-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).