public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55159] New: pythy constexpr auto lambda pointer has no initializer
@ 2012-11-01  0:33 supercilious.dude at gmail dot com
  2012-11-01 10:58 ` [Bug c++/55159] " daniel.kruegler at googlemail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: supercilious.dude at gmail dot com @ 2012-11-01  0:33 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-07 16:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-01  0:33 [Bug c++/55159] New: pythy constexpr auto lambda pointer has no initializer supercilious.dude at gmail dot com
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

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).