public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48735] New: [C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor
@ 2011-04-22 20:55 daniel.kruegler at googlemail dot com
  2011-05-09 22:59 ` [Bug c++/48735] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-04-22 20:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48735

           Summary: [C++0x][SFINAE] Hard errors with array
                    list-construction and deleted default c'tor
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@redhat.com


gcc 4.7.0 20110422 (experimental) in C++0x mode rejects the following code:

//-------------------------
template<class T, 
 class = decltype(T{})
>
char f(int);

template<class>
char (&f(...))[2];

struct ND { ND() = delete; };

static_assert(sizeof(f<ND[1]>(0)) != 1, "Error");
//-------------------------

"error: use of deleted function ‘ND::ND()’"

The code should be accepted.


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

end of thread, other threads:[~2011-05-09 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-22 20:55 [Bug c++/48735] New: [C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor daniel.kruegler at googlemail dot com
2011-05-09 22:59 ` [Bug c++/48735] " paolo.carlini at oracle dot com
2011-05-09 23:11 ` paolo at gcc dot gnu.org
2011-05-09 23:15 ` 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).