c++ - member template class bug
- Christof Meerwald (30/30) Oct 09 2002 This one looks like a bug to me:
- Matthew Wilson (11/41) Oct 09 2002 Christof
- Walter (3/4) Oct 11 2002 Fixed & posted.
- Sergey Gutnikov (6/11) Nov 11 2002 Please include a .DLL version of compiler in beta.zip for those who need...
This one looks like a bug to me:
template<class T>
struct A
{
 public:
  template<class U>
  struct B
  {
   public:
    void f()
    { }
    void g();
  };
};
template<class T>
template<class U>
void A<T>::B<U>::g()
{ }
// Error: 'B' is not a class template
int main(int argc, char *argv[])
{
  A<int>::B<char> a;
  a.f();
  a.g();
  return 0;
}
bye, Christof
-- 
http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de
 Oct 09 2002
Christof
This is a bug, but to be fair to DMC, very few compilers allow the
out-of-class definition of functions of nested template classes. Because of
this, there are very few code bases that will be looking for such support
from compilers, so I guess its legitimate for Walter to not have dealt with
this one yet.
On the other hand, we know how he likes to provide things before other
vendors can ...
Matthew
"Christof Meerwald" <cmeerw web.de> wrote in message
news:ao163s$1hei$1 digitaldaemon.com...
 This one looks like a bug to me:
 template<class T>
 struct A
 {
  public:
   template<class U>
   struct B
   {
    public:
     void f()
     { }
     void g();
   };
 };
 template<class T>
 template<class U>
 void A<T>::B<U>::g()
 { }
 // Error: 'B' is not a class template
 int main(int argc, char *argv[])
 {
   A<int>::B<char> a;
   a.f();
   a.g();
   return 0;
 }
 bye, Christof
 --
 http://cmeerw.org                                 JID: cmeerw jabber.at
 mailto cmeerw at web.de
 Oct 09 2002
Fixed & posted. "Christof Meerwald" <cmeerw web.de> wrote in message news:ao163s$1hei$1 digitaldaemon.com...This one looks like a bug to me:
 Oct 11 2002
In article <ao63lr$m3o$1 digitaldaemon.com>, Walter says...Fixed & posted. "Christof Meerwald" <cmeerw web.de> wrote in message news:ao163s$1hei$1 digitaldaemon.com...Please include a .DLL version of compiler in beta.zip for those who need it directly from IDDE. Sergey Gutnikov sgutnikov by.byelex.com http://www.multimedia.byelex.com/This one looks like a bug to me:
 Nov 11 2002








 
  
  
  Sergey Gutnikov <Sergey_member pathlink.com>
 Sergey Gutnikov <Sergey_member pathlink.com>