This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13967] [3.3?/3.4/3.5 regression] template template argument identifier lookup fails scoping rules


------- Additional Comments From giovannibajo at libero dot it  2004-02-02 00:42 -------
Yes, it's a regression too. The final testcase which should be accepted is the 
following:

-------------------------------------------------------------------
struct X
{
  struct C { int x; };
  struct Z { Z(float); };

  template<typename T,  typename A, template<typename,typename> class C>
    C<T, A> Func()
  {
    return C<T, A>(); // sees X::C not template parameter
  }

  template< typename Z > Z Zunc()
  {
    return Z(); // works ok
  }

  void foo(void)
  {
    Zunc<int>();
  }
};
-------------------------------------------------------------------
pr13967.cpp: In member function `C<T, A> X::Func()':
pr13967.cpp:9: error: `X::C' is not a template
pr13967.cpp: In member function `Z X::Zunc() [with Z = int]':
pr13967.cpp:19:   instantiated from here
pr13967.cpp:14: error: no matching function for call to `X::Z::Z()'
pr13967.cpp:4: note: candidates are: X::Z::Z(const X::Z&)
pr13967.cpp:4: note:                 X::Z::Z(float)



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-02 00:42:26
               date|                            |
            Summary|template template argument  |[3.3?/3.4/3.5 regression]
                   |identifier lookup fails     |template template argument
                   |scoping rules               |identifier lookup fails
                   |                            |scoping rules


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]