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

* [Bug c++/48735] [C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-09 22:59 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.05.09 22:51:56
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-09 22:51:56 UTC ---
Is already fixed in mainline, I'm going to add the testcase and close the PR.


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

* [Bug c++/48735] [C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor
  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
  2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-05-09 23:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-05-09 22:57:22 UTC ---
Author: paolo
Date: Mon May  9 22:57:19 2011
New Revision: 173597

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173597
Log:
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/48735
    * g++.dg/cpp0x/sfinae21.C: New.

2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

    * g++.dg/template/sfinae28.C: Rename to...
    * g++.dg/cpp0x/sfinae19.C: ... this.
    * g++.dg/template/sfinae29.C: Rename to...
    * g++.dg/cpp0x/sfinae20.C: ... this.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/sfinae19.C
      - copied unchanged from r173596,
trunk/gcc/testsuite/g++.dg/template/sfinae28.C
    trunk/gcc/testsuite/g++.dg/cpp0x/sfinae20.C
      - copied unchanged from r173596,
trunk/gcc/testsuite/g++.dg/template/sfinae29.C
    trunk/gcc/testsuite/g++.dg/cpp0x/sfinae21.C
Removed:
    trunk/gcc/testsuite/g++.dg/template/sfinae28.C
    trunk/gcc/testsuite/g++.dg/template/sfinae29.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/48735] [C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor
  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
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-09 23:15 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-09 23:01:26 UTC ---
Done.


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