public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous
@ 2015-07-24  9:06 rs2740 at gmail dot com
  2015-07-24  9:08 ` [Bug c++/66990] " rs2740 at gmail dot com
  2015-07-24 10:18 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: rs2740 at gmail dot com @ 2015-07-24  9:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66990

            Bug ID: 66990
           Summary: Wrong diagnostics when template being specialized is
                    ambiguous
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Consider:

namespace A {
    inline namespace B { template<class> struct C; }
    template<class> struct C;
    template<> struct C<int>{};
}

Lookup for `C` is ambiguous, obviously, but the diagnostics doesn't say that.
Instead, we get (with gcc 

prog.cc:4:23: error: 'C' is not a class template
     template<> struct C<int>{};
                       ^
prog.cc:4:28: error: template specifiers not specified in declaration of
'template<class> struct A::C'
     template<> struct C<int>{};
                            ^

which is rather unhelpful.


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

end of thread, other threads:[~2015-07-24 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24  9:06 [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous rs2740 at gmail dot com
2015-07-24  9:08 ` [Bug c++/66990] " rs2740 at gmail dot com
2015-07-24 10:18 ` redi 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).