From 6232044336785159688
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,109af18a94b8a35c
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,e5cae9ffbf1dd57e
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-10-05 15:46:06 PST
Xref: sparky comp.lang.c++:14552 comp.std.c++:1318
Newsgroups: comp.lang.c++,comp.std.c++
Path: sparky!uunet!secapl!Cookie!frank
From: frank@Cookie.secapl.com (Frank Adams)
Subject: Re: The concept of templates considered ill designed
Message-ID: <1992Oct05.172602.158050@Cookie.secapl.com>
Date: Mon, 05 Oct 1992 17:26:02 GMT
References: <1992Oct1.140643.9775@cadsun.corp.mot.com> <1992Oct2.153826.12051@ucc.su.OZ.AU> <BvM0DE.EA7@watcgl.uwaterloo.ca>
Organization: Security APL, Inc.
Lines: 17

In article <BvM0DE.EA7@watcgl.uwaterloo.ca> pfbertra@watcgl.uwaterloo.ca (Philippe F. Bertrand) writes:
>In article <1992Oct2.153826.12051@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
>It would be nice if templates could have some sort of base class derivation
>rules.  Ie instead of < class T > have <class Foo T> which restricts T to be
>a class publicly derived from Foo.

If something like this is adopted, I think a better syntax would be:

<class T : Foo>

similar to the notation for inheritance.  It would be nice to permit:

<class T : Foo, Bar, int>

meaning class T could be a subclass of Foo or of Bar, or could be type int.
Unfortunately, it is difficult to tell this comma from one introducing a new
parameter.


