Top "Specialization" questions

A powerful feature of C++'s templates is `template specialization`. This allows alternative implementations to be provided based on certain characteristics of the parameterized type that is being instantiated.

explicit specialization of template class member function

I need to specialize template member function for some type (let's say double). It works fine while class X itself …

c++ templates gcc specialization
Template specialization of a single method from a templated class

Always considering that the following header, containing my templated class, is included in at least two .CPP files, this code …

c++ visual-studio-2008 templates specialization
friend declaration declares a non-template function

I have a base Class akin to the code below. I'm attempting to overload << to use with cout. …

c++ templates operator-overloading friend specialization
c++ template partial specialization member function

I'm new to templates so maybe this is a trivial thing but I cannot get it to work. I'm trying …

c++ templates specialization
C++ template specialization of constructor

I have a templated class A<T, int> and two typedefs A<string, 20> and A<…

c++ templates constructor specialization
Template specialization based on inherit class

I want to make this specialized w/o changing main. Is it possible to specialize something based on its base …

c++ templates specialization
C++ partial template specialization in combination with std::is_base_of and std::enable_if

Let's say I have a two classes: Serializable and Printable. So a simple template function which accepts all derived classes …

templates c++11 specialization
Template Specialization for a function without Parameters

I need to specialize a function template in c++. template<typename T> void doStuff<T>() {} To …

c++ templates specialization
C++ single template specialisation with multiple template parameters

Hallo! I would like to specialise only one of two template types. E.g. template <typename A, typename B&…

c++ templates specialization
Selecting a member function using different enable_if conditions

I am trying to determine which version of a member function gets called based on the class template parameter. I …

c++ templates c++11 sfinae specialization