Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Partial Template Specialization? Pin
Joaquín M López Muñoz19-Feb-02 6:08
Joaquín M López Muñoz19-Feb-02 6:08 
GeneralRe: Partial Template Specialization? Pin
Nemanja Trifunovic19-Feb-02 6:10
Nemanja Trifunovic19-Feb-02 6:10 
GeneralRe: Partial Template Specialization? Pin
Tim Smith19-Feb-02 9:51
Tim Smith19-Feb-02 9:51 
GeneralRe: Partial Template Specialization? Pin
Christian Graus19-Feb-02 11:58
protectorChristian Graus19-Feb-02 11:58 
GeneralRe: Partial Template Specialization? Pin
Joaquín M López Muñoz19-Feb-02 19:49
Joaquín M López Muñoz19-Feb-02 19:49 
AnswerRe: Partial Template Specialization? Pin
Michael Dunn19-Feb-02 8:29
sitebuilderMichael Dunn19-Feb-02 8:29 
AnswerRe: Partial Template Specialization? Pin
Steen Krogsgaard20-Feb-02 0:03
Steen Krogsgaard20-Feb-02 0:03 
GeneralRe: Partial Template Specialization? Pin
Jamie Hale20-Feb-02 6:36
Jamie Hale20-Feb-02 6:36 
I'm just starting to understand it, but it goes something like this...

If you have a template

template<typename T>
class Wank {
public:
void Stoo();
};

you can "override" the definition by providing other templates

template<typename T>
class Wank<int> {
public:
void Stoo();
};

template<typename T>
class Wank<T *> {
public:
void Stoo();
};

The first is used when you declare a Wank object with an int parameter - this is called explicit template specialization. The second is used when you declare a Wank object with a pointer parameter - this is called partial template specialization. PTS is used a bunch with STL iterators.

This is just an example. There have been some good articles in CUJ about it, and I have a few books (STL stuff) coming that will hopefully go into much more detail.

J

GeneralProblem with Class View VC++ 6 Pin
Mike Gaskey19-Feb-02 5:37
Mike Gaskey19-Feb-02 5:37 
GeneralRe: Problem with Class View VC++ 6 Pin
Rage19-Feb-02 5:43
professionalRage19-Feb-02 5:43 
GeneralRe: Problem with Class View VC++ 6 Pin
Jamie Hale19-Feb-02 6:25
Jamie Hale19-Feb-02 6:25 
GeneralRe: Problem with Class View VC++ 6 Pin
J Patel19-Feb-02 7:02
J Patel19-Feb-02 7:02 
GeneralAccessing Dialog Data in MFC Pin
Rage19-Feb-02 5:32
professionalRage19-Feb-02 5:32 
GeneralRe: Accessing Dialog Data in MFC Pin
Nish Nishant19-Feb-02 5:52
sitebuilderNish Nishant19-Feb-02 5:52 
GeneralRe: Accessing Dialog Data in MFC Pin
Derek Waters19-Feb-02 11:32
Derek Waters19-Feb-02 11:32 
GeneralRe: Accessing Dialog Data in MFC Pin
Rage19-Feb-02 21:57
professionalRage19-Feb-02 21:57 
GeneralRe: Accessing Dialog Data in MFC Pin
Derek Waters20-Feb-02 11:21
Derek Waters20-Feb-02 11:21 
GeneralProblems with IMessageFilter in SDI Pin
Fredrik Skog19-Feb-02 4:42
Fredrik Skog19-Feb-02 4:42 
GeneralRe: Problems with IMessageFilter in SDI Pin
Fredrik Skog21-Feb-02 0:33
Fredrik Skog21-Feb-02 0:33 
GeneralBeginner Dialog::OnOK() Question Pin
CreekDawg19-Feb-02 4:28
CreekDawg19-Feb-02 4:28 
GeneralRe: Beginner Dialog::OnOK() Question Pin
v_krishnan19-Feb-02 4:34
v_krishnan19-Feb-02 4:34 
GeneralRe: Beginner Dialog::OnOK() Question Pin
Joaquín M López Muñoz19-Feb-02 4:35
Joaquín M López Muñoz19-Feb-02 4:35 
GeneralRe: Beginner Dialog::OnOK() Question Pin
Roger Allen19-Feb-02 4:37
Roger Allen19-Feb-02 4:37 
GeneralRe: Beginner Dialog::OnOK() Question Pin
lucy19-Feb-02 9:52
lucy19-Feb-02 9:52 
GeneralMaking a CRichEditView Readonly Pin
v_krishnan19-Feb-02 4:10
v_krishnan19-Feb-02 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.