Tagged 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. Template specialization has two purposes: to allow certain forms of optimization, and to ...

Mooing Duck makes a comment here that "One function can't return multiple types. However, you can specialize or delegate to overloads, which works fine."
I started thinking about that, and I'm trying ...

When writing template specialization with SFINAE you often come to the point where you need to write a whole new specialization because of one small not-existing member or function. I would like to ...

I'm trying to specialize a templated method in a non-templated class, where the method's return type includes the templated type - this method takes no arguments. I've been searching around and trying ...

3 Files: main.cpp, Pair.h, List.h
This program asks for Product name and Product price (in a loop), main creates a pair object and adds it to the list object.
List class contains a pair object, and ...

I'm having some problems with syntax(assumption) regarding declaration of member function in template specialization.
I have a simple class Stack that treats every type the same except strings
This ...

Is it possible to override a property but also call the base property set method?
For example; in the class Child I want to override the this[] operator but also call the base this[] operator aswell?
...

I am trying to consolidate a number of very similar function methods from a class similar to the one shown below and I thought that the best way to efficiently implement this, would be through the use ...

So I have found out that I need to do a specialization Hierarchies model, however I can't quite figure out how to code it. I have found some information on how to do generalization.
My question is: ...