[LLVMbugs] [Bug 13894] New: Weird name lookup failure instantiating explicit destructor call

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 20 19:38:57 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13894

             Bug #: 13894
           Summary: Weird name lookup failure instantiating explicit
                    destructor call
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Testcase (from g++.old-deja/g++.pt/memclass5.C):
// { dg-do run  }
template <class T> struct A {
  template <class U> struct B {
    template <class V> static void f () { }
    void g () { }
  };
};
template <class T, class U> void f() {
  A<T>::template B<U>::template f<T> ();
  typename A<T>::template B<U> b;
  typename A<T>::template B<U> b2;
  b.A<T>::template B<U>::~B();
}  
int main () {
  f<int, char>();
}

<stdin>:12:27: error: typename specifier refers to non-type member 'B' in
'A<int>'
  b.A<T>::template B<U>::~B();
                          ^
<stdin>:15:3: note: in instantiation of function template specialization
'f<int, char>' requested here
  f<int, char>();
  ^
<stdin>:3:29: note: referenced member 'B' is declared here
  template <class U> struct B {
                            ^
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list