🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Alain MINIUSSI Fri, 28 Jul 1995 16:56
nested classes in template (syntax)
#1520
Author: Alain MINIUSSI
Date: Fri, 28 Jul 1995 16:56
36 lines
1108 bytes
I like to declare nested classes this way :

in A.h :

class A {
  public:
    class B;
  public:
    A();
 etc....
};

in A_B.h:

class A::B {
  public:
    B();
   ~B();
  etc...
};

in A_B.cc :

A::B::B() : etc...

what is the correct syntax if A is a template class ?

-- 
*=================================================================*
    Miniussi Alain  	    	        tel: (33) 56-84-69-08
    LaBRI	                        fax: (33) 56-84-66-69
    Univ. BORDEAUX I          
    351, cours de la Liberation        
    33405 TALENCE 	
    FRANCE                    e-mail:miniussi@labri.u-bordeaux.fr
*=================================================================*
Re: nested classes in template (syntax)
#1521
Author: Alain MINIUSSI
Date: Fri, 28 Jul 1995 17:12
41 lines
1473 bytes
In article <3vb4rr$2h3@serveur.cribx1.u-bordeaux.fr>, miniussi@labri.u-bordeaux.fr (Alain MINIUSSI) writes:
|> I like to declare nested classes this way :
|> 
|> in A.h :
|> 
|> class A {
|>   public:
|>     class B;
|>   public:
|>     A();
|>  etc....
|> };
|> 
|> in A_B.h:
|> 
|> class A::B {
|>   public:
|>     B();
|>    ~B();
|>   etc...
|> };
|> 
|> in A_B.cc :
|> 
|> A::B::B() : etc...
|> 
|> what is the correct syntax if A is a template class ?

the other question is:
  - does the standard allow that kind of stuff and, if not 
(my compiler says no) : why ?
 
-- 
*=================================================================*
    Miniussi Alain  	    	        tel: (33) 56-84-69-08
    LaBRI	                        fax: (33) 56-84-66-69
    Univ. BORDEAUX I          
    351, cours de la Liberation        
    33405 TALENCE 	
    FRANCE                    e-mail:miniussi@labri.u-bordeaux.fr
*=================================================================*
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads