Slashdot Mirror


Function Template Specialization in C++

friedo writes "About.com has an excellent two-part article (Part 1, Part 2) by Eric Nagler, author of "Learning C++," about "specializing" function templates in C++. "Rather than specifying an explicit type of all of the arguments or the return value in the definition of a function, placeholders are used. This reduces the need to create and maintain multiple copies of a function for different parameter types. But sometimes, it is not possible to write a single function template that works efficiently or even correctly for every argument type. It is in these cases that function template specialization is useful.""

2 of 89 comments (clear)

  1. C++? by Anonymous Coward · · Score: -1, Troll

    More like Gay++ if you ask me.

  2. Dead Horse by Anonymous Coward · · Score: -1, Troll

    Excuse me - but who cares? Who finds C++ interesting?

    The language is all wrong from the get-go, and all the add-ons aren't going to change a thing.

    It's an abomination.