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++/19552] Compile error on template member function called from template function


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-21 00:37 -------
The code is invalid (by the C++ standard)
  mc_foo<W3> val3 = val;    // W3 == 16 in this example
val3.f<16>(0);

Since val3 is dependent name, we don't know that val3.f is a template so we reject the code.

you need to use the template keyword like so:
val3.template f<16>(0);


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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