The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

C++ template question (just out of curiousity) by blowfish 2007-05-06 08:53:11
Just out of curiousity, does anyone know a way to store a reference to a 2 parameter template class like template <class i,char t> class foo into a variable other than a void pointer which can actually access the methods of foo but doesn't have both template parameters? I'm talking about something like: foo<i,t> list; foo &item = list . Anyone got an idea? It's driving me mad. I got a work around i'm pretty sure there is a way. Hours of googling didn't yield anything useful. Thanks in advance
[ Reply ]
  I don't think it's possible. by Michiel2007-05-06 09:15:36
    I'm with him. (n/t) by Stuka2007-05-06 09:59:35
  templates are a specialized form of macro, so they by Schol-R-LEA;22007-05-06 11:28:02
  Only if the class descends from a non-generic by Arachnid2007-05-06 13:10:37
    Good point. (n/t) by Michiel2007-05-06 13:15:33
  Maybe... by fuzzyeric2007-05-06 15:43:53
  Thanks for your help by blowfish2007-05-07 01:06:37

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)