Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I hate C++ templates.

Name: Anonymous 2006-08-17 20:22

So, I've got one template class, that I use twice for different objects. (e.g: template_class<A>, template_class<B>) This is fine and dandy. Now, I want to do an operation utilizing both of them, and their private data. One would think, hey, same base template class, there shouldn't be a problem if I make a member function in one and access both, right? Nope, treats them as distinct types so there is no way for one to access the private data of the other.

Now, how the hell do I friend the template class to other variants of itself? All I receive are parse errors, and consulting TC++PL is no damned help at all. If this is impossible I'm going to have to restructure the code to generically use void pointers, which isn't a big deal but is frustrating.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List