public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51641] New: Lookup finds enclosing class member instead of template parameter
@ 2011-12-20 17:08 jason at gcc dot gnu.org
  2012-01-25 17:35 ` [Bug c++/51641] " dodji at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-20 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51641
           Summary: Lookup finds enclosing class member instead of
                    template parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org
                CC: dodji@gcc.gnu.org
        Depends on: 36019, 45625


Another case of the lookup problem you fixed previously has come up on the core
mailing list:

struct A {
    struct B { typedef int X; };
};

template<class B> struct C : A {
    B::X q; // Ok: A::B.                                                        
    struct U { typedef int X; };
    template<class U>
        struct D;
};

template<class B>
template<class U>
struct C<B>::D {
    typename U::X r; // { dg-error "" }

C<int>::D<double> y;

The use of U in D should find the template parameter, leading to an error on
instantiation.


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

end of thread, other threads:[~2012-03-13 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 17:08 [Bug c++/51641] New: Lookup finds enclosing class member instead of template parameter jason at gcc dot gnu.org
2012-01-25 17:35 ` [Bug c++/51641] " dodji at gcc dot gnu.org
2012-01-26 13:30 ` dodji at gcc dot gnu.org
2012-01-30 14:37 ` dodji at gcc dot gnu.org
2012-01-30 15:53 ` dodji at gcc dot gnu.org
2012-03-13 21:38 ` dodji at gcc dot gnu.org
2012-03-13 21:50 ` dodji 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).