🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Joseph N. Wilson Tue, 22 Dec 1992 20:45
templatized typedef?
#1140
Author: Joseph N. Wilson
Date: Tue, 22 Dec 1992 20:45
29 lines
1417 bytes
Please forgive me if this is old ground for this group.

CFront 3.0.1 does not let me do the following:

	template <class T>
	class C{ ... };

	template <class S>
	typedef C<S>  D;


The reason I'd like to do this is to be able to rename (using typedef)
a number of classes.  I thought this would be a clean way to rename
the template classes if it were supported.  I had a suspicion it might not
be supported right from the start.

Anyway, here's my question:

Is what I'm trying to do above _standard_ C++, or is it a fringe interpretation.
I figured because my typedef is a decl-specifier introducing a class-name,
that it should be a valid class declaration, thus the ARM should be satisfied
on page 342.  Is my reasoning faulty?  What do you gurus say?

Joe Wilson
(jnw@cis.ufl.edu)

P.S. CFront complains saying "D: only static data class members may be
parameterized."  I have difficulty interpreting this message in the context
above.
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