Partial specialization of function templates

Does anyone know whether, in C++11, function templates can be partially specialized?

Upvotes: 20

Views: 4952

Answers (2)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385098

No; they were proposed as core language issue #229 (from n1295) but ultimately rejected (and quite rightly so, since overloading does the job).

Upvotes: -1

Mike Seymour
Mike Seymour

Reputation: 254431

No, they can't. The draft C++0x standard has a section (14.5.5) on class template partial specialisations, but no mention of function template partial specialisations.

Upvotes: 15

Related Questions