public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57429] New: Dependent function call with one visible declaration, deleted
@ 2013-05-27 10:41 potswa at mac dot com
  2013-06-04  2:57 ` [Bug c++/57429] " potswa at mac dot com
  0 siblings, 1 reply; 2+ messages in thread
From: potswa at mac dot com @ 2013-05-27 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57429
           Summary: Dependent function call with one visible declaration,
                    deleted
           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

A dependent function call can't be resolved until instantiation time, but if
there's only one candidate visible from the template definition, that candidate
is accessed such as to produce an error if deleted, even if it would be
eliminated by the first stages of overload resolution.

Clang accepts this valid TU but GCC produces two errors. Also a good idea to
test in a SFINAE context, which is where this cropped up.

void f() = delete;

template< typename t >
void ft() { f( t() ); }

template< typename t >
struct ct { decltype( f( t() ) ) m; };

The workaround is to define another overload, which may also be deleted.


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

* [Bug c++/57429] Dependent function call with one visible declaration, deleted
  2013-05-27 10:41 [Bug c++/57429] New: Dependent function call with one visible declaration, deleted potswa at mac dot com
@ 2013-06-04  2:57 ` potswa at mac dot com
  0 siblings, 0 replies; 2+ messages in thread
From: potswa at mac dot com @ 2013-06-04  2:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Krauss <potswa at mac dot com> ---
To clarify the example, it's failing at definition time. There are two separate
failures illustrated, a function template and a class template.


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 10:41 [Bug c++/57429] New: Dependent function call with one visible declaration, deleted potswa at mac dot com
2013-06-04  2:57 ` [Bug c++/57429] " potswa at mac 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).