Thread: Double template specializations

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by twomers
    How's Time travelling going for you?

    Just out of curiosity, I only have a small knowledge of templating, why do you have 'template<>' before your void Logger::log<int> thing.
    Because that's required syntax for template specialization. As, I was saying though, I don't see the need for template specialization here. I might be misunderstanding though. I feel like overloading the function is just as easy for the special case. Does the compile still generate a int version of the templated function when you just overload as I did?
    Last edited by SlyMaelstrom; 08-23-2006 at 07:13 AM.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No Match For Operator+ ???????
    By Paul22000 in forum C++ Programming
    Replies: 24
    Last Post: 05-14-2008, 10:53 AM
  2. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  3. expected primary expression
    By mju4t in forum C Programming
    Replies: 2
    Last Post: 03-27-2007, 06:59 PM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. Please HELP!!
    By traz in forum C++ Programming
    Replies: 4
    Last Post: 04-14-2003, 09:20 PM