Member Template Classes 
Author Message
 Member Template Classes

I have created a program that uses Member Template Classes.  I have Visual
C++ 5.0.  I could not access a member function of one of the member template
classes so my program failed to compile.  I then found out in a
Knowledgebase article that MS VC++ 5.0 does not support member template
classes. Article ID: Q165684.

Actually, the article just says member templates, so I guess this means
templates of any kind.

Does anyone know if Visual C++ 6.0 supports them?  If not, does anyone know
a better way to accomplish:

1.   Generalization of base class functionality on differing data types, ie,
I need to generalize the action of a base class on arrays of byte of
differing sizes.  Right now, I have a template class that takes an array of
any size and does various things with it.  I specify the array size at
instantiation time.
2.  Inclusion of instantiated classes as members of a container class.  For
instance, I could have a class instantiated on an array of 6 bytes and
another on an array of 4 bytes as members of a container class.  Right now,
I just included my template classes instantiated appropriately in the
containing class but it failed to work correctly as mentioned above.  I also
have the need to overload the constructors and member functions of the
member classes.

I do not need runtime polymorphism, just compile time polymorphism.  I
thought I had the perfect solution, and it would have worked, but ... oh,
well....

--

J. Scott Sanbar
MCSE::MCP+Internet::CNE

(take away dash from return address to e-mail me)



Sun, 01 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. template class with a template member function

2. Template member functions of template classes

3. calling template member function in template class

4. Function template as member in a class template

5. template member function - non template class - VC5 - error

6. Simple question: Member function templates in template classes under VC++ 5.0

7. Using member function templates in template class under VC++ 5.0

8. calling template member function in template class

9. can't invoke template class member function

10. template classes with static members

11. Must template members be defined in class declarations?

12. static data member of template class

 

 
Powered by phpBB® Forum Software