public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54890] New: Incorrect SFINAE Rejection
@ 2012-10-10 15:19 pmenso57 at comcast dot net
  2012-10-10 16:00 ` [Bug c++/54890] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pmenso57 at comcast dot net @ 2012-10-10 15:19 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54890
           Summary: Incorrect SFINAE Rejection
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pmenso57@comcast.net


When explicitly specifying the template parameters to a function template in
the following context, the compiler incorrectly removes the function from the
overload set for a substitution failure which should not exist.

struct A {
    template<class T> struct apply { };
};

template<class T, class... U>
void f(typename T::template apply<U...>*) { }

int main() {
    f<A, int>(nullptr);
    return 0;
}

Output from the compiler is:

In function ‘int main()’:
error: no matching function for call to ‘f(std::nullptr_t)’
note: candidate is:
note: template<class T, class ... U> void f(typename T::apply<U ...>*)
note:   template argument deduction/substitution failed:
note:   mismatched types ‘A::apply<U ...>*’ and ‘std::nullptr_t’

Which I believe is incorrect.


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

end of thread, other threads:[~2014-12-15 15:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 15:19 [Bug c++/54890] New: Incorrect SFINAE Rejection pmenso57 at comcast dot net
2012-10-10 16:00 ` [Bug c++/54890] " paolo.carlini at oracle dot com
2012-10-10 16:20 ` paolo.carlini at oracle dot com
2012-10-10 17:32 ` paolo.carlini at oracle dot com
2013-03-22 14:47 ` jakub at gcc dot gnu.org
2013-05-31 11:00 ` jakub at gcc dot gnu.org
2013-10-16  9:50 ` jakub at gcc dot gnu.org
2014-05-12  8:26 ` paolo.carlini at oracle dot com
2014-05-13 15:59 ` paolo.carlini at oracle dot com
2014-12-14 14:37 ` ville.voutilainen at gmail dot com
2014-12-15 15:24 ` [Bug c++/54890] [DR 1982] " jason at gcc dot gnu.org

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