public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57419] New: Access control doesn't stop referring to a deleted function
@ 2013-05-26  7:04 potswa at mac dot com
  2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: potswa at mac dot com @ 2013-05-26  7:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57419
           Summary: Access control doesn't stop referring to a deleted
                    function
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: potswa at mac dot com

Using reference-to-member syntax on a private, deleted function in a SFINAE
context fails as a hard error as a use of a deleted function. But it can't be
accessed in the first place due to the access control. Calling the function
instead produces the desired result.

Clang 3.2 accepts this TU but GCC 4.9 rejects:

template< typename q >
decltype( &q::f ) t( q ) {}

char t( ... ) { return {}; }

class c { void f() = delete; };
class d { static void f() = delete; };

static_assert( sizeof( t( c() ) ), "c" );
static_assert( sizeof( t( d() ) ), "d" );


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

end of thread, other threads:[~2013-06-04  8:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  7:04 [Bug c++/57419] New: Access control doesn't stop referring to a deleted function potswa at mac dot com
2013-05-28 10:06 ` [Bug c++/57419] " redi at gcc dot gnu.org
2013-06-02 23:04 ` paolo.carlini at oracle dot com
2013-06-03 20:40 ` paolo.carlini at oracle dot com
2013-06-04  2:35 ` potswa at mac dot com
2013-06-04  8:36 ` 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).