Re: Generic classes with number as arguments
Cyril ADRIAN <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
Hello, LEMAITRE Guillaume wrote: > class TOTO[ N -> NUMBER ] > -- ... > end > > and to use it like this > > TOTO[ INTEGER ] > or > TOTO[ REAL ] > > but, as INTEGER and REAL are expanded classes, this use is not authorized That's not the problem. You just made a small mistake: there is a confusion between NUMBER, which is our infinite-precision library, and NUMERIC, which is the common parent of INTEGER and REAL. So just use TOTO[N->NUMERIC] and everything should run just fine ;o) Best regards, Cyril