delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/09/03:46:09

From: gvetere AT rs0 DOT corinto DOT interbusiness DOT it (Guido Vetere)
Subject: template argument nested type bug
9 Oct 1997 03:46:09 -0700 :
Message-ID: <9710081505.AA21582.cygnus.gnu-win32@rs0.corinto.interbusiness.it>
Mime-Version: 1.0
To: <gnu-win32 AT cygnus DOT com>


I'm trying to compile a project previously build with MS Visual C++ 4.0 and
IBM C-Set++ (AIX) with gnu-win32 (NT 4.0, b18).

My code is full of expressions like this:

template <class T>
class C {
    public:
	typedef T temp_class;
	typedef temp_class::type1 type1;  // line N
}; 

which cause (gnu-win32) errors like this:

(line N): syntax error before ;
even if the context defines the appropriate nested type in the template
argument:

class T1 {
	public:
	typedef int type1;
};

int main () {

	C<T1>::type1 t = 10;
}


A friend told me that the example above compiles with gnu for Os2 and
Linux, so I argue that the syntax error is due to a win32 compiler bug.

Any hint ?
 ________________________________________
 Guido Vetere @ CONS. CORINTO
 Via N.Tridente 42, BARI, Italy
 tel +39 80 5498341
 fax +39 80 5498333
 cell 0347 2658120
 email gvetere AT corinto DOT interbusiness DOT it
 ________________________________________
 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019