Book a Demo

Author Topic: Class template  (Read 3489 times)

sgs32r

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Class template
« on: May 15, 2008, 01:12:13 am »
Hello,

I would like to imitate a class template (named FArray) with two formal template parameters. The first formal template
parameter (named T) is an unconstrained class template parameter. The second formal template parameter (named k) is an
integer expression template parameter that has a default of 10. There is also a bound class (named AddressList) that
substitutes the Address for T and 3 for k.

How can this model ?

sgs32r

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Class template
« Reply #1 on: May 17, 2008, 12:28:13 am »
Nobody have idea ?

I want to know if it's possible to model a class extending a parametred class and a parametred interface.

Stephane W.

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Class template
« Reply #2 on: May 20, 2008, 02:27:11 am »
I have the same issue...
There doesn't seem to be a way to extend something involving two template parameters.
For instance, if I generalize a class with a template, I can't realize an interface with another template parameter. The opposite is also true...
Can someone help us please ?