Click here to Skip to main content
16,012,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGetRandomRgn API has no definition in wingdi.h Pin
6-Dec-00 4:24
suss6-Dec-00 4:24 
GeneralRe: GetRandomRgn API has no definition in wingdi.h Pin
Michael Dunn6-Dec-00 12:36
sitebuilderMichael Dunn6-Dec-00 12:36 
GeneralRe: GetRandomRgn API has no definition in wingdi.h Pin
6-Dec-00 22:12
suss6-Dec-00 22:12 
GeneralPb with Rectangle API under Windows 2000 Pin
6-Dec-00 4:10
suss6-Dec-00 4:10 
GeneralSystem tray icon Pin
Amol Pargaonkar5-Dec-00 22:39
Amol Pargaonkar5-Dec-00 22:39 
GeneralNNTP server Pin
5-Dec-00 21:16
suss5-Dec-00 21:16 
GeneralPartial Specialisation Pin
5-Dec-00 20:17
suss5-Dec-00 20:17 
GeneralRe: Partial Specialisation Pin
Erik Funkenbusch6-Dec-00 10:53
Erik Funkenbusch6-Dec-00 10:53 
Template Specialization can be thought of as Template overloading. You can declare a template, and then specialize the templates for specific cases (much like overloading a function allows you to specify what code gets called for different arguments).

There are two types of specialization, Explicit specialization and Partial Specialzation.

Explicit specialization is when you specialize all template parameters. For instance:

template<class t=""> class blah;
template<> class blah<char>;

The second line is an explicit specialization. If you create a template with a char type then it uses the code in the second declaration.

Partial Template Specialization is when you do not specialize all arugments. For instance:

template<class t1,="" class="" t2,="" int="" i=""> class A;
template<class t1,="" class="" t2,="" int="" i=""> class A<t1, t2*,="" i="">;

In this example, the second declartion is a partial template specialization because it only specializes the second parameter (by making it a T2 pointer instead of a T2). You can also partial specialize a template with different parameters, such as:

template<class t1,="" class="" t2,="" int="" i=""> class A;
template<class t,="" int="" i=""> class A<t, t*,="" i="">;

In this case, you are specifying only 2 parameters for the specialization, but using the first argument again as a pointer in the second.

VC++ does not support PTS, and it will not support it in VC7 either (sadly).
GeneralRe: Partial Specialisation Pin
Leo Davidson7-Dec-00 9:17
Leo Davidson7-Dec-00 9:17 
GeneralRe: Partial Specialisation Pin
Erik Funkenbusch7-Dec-00 9:30
Erik Funkenbusch7-Dec-00 9:30 
GeneralRe: Partial Specialisation Pin
Jonathan Gilligan7-Dec-00 21:30
Jonathan Gilligan7-Dec-00 21:30 
GeneralRe: Partial Specialisation (again) Pin
Erik Funkenbusch8-Dec-00 10:28
Erik Funkenbusch8-Dec-00 10:28 
GeneralODBC API stuff Pin
Steve Driessens5-Dec-00 16:34
Steve Driessens5-Dec-00 16:34 
GeneralRe: ODBC API stuff Pin
6-Dec-00 5:12
suss6-Dec-00 5:12 
GeneralRe: ODBC API stuff Pin
Steve Driessens6-Dec-00 17:22
Steve Driessens6-Dec-00 17:22 
GeneralMFC ACctiveX Pin
5-Dec-00 14:56
suss5-Dec-00 14:56 
GeneralRe: MFC ACctiveX Pin
Erik Funkenbusch6-Dec-00 10:56
Erik Funkenbusch6-Dec-00 10:56 
GeneralRe: MFC ACctiveX Pin
7-Dec-00 12:00
suss7-Dec-00 12:00 
GeneralNetbios Pin
Den5-Dec-00 10:50
Den5-Dec-00 10:50 
GeneralRe: Netbios Pin
Christian Graus5-Dec-00 13:59
protectorChristian Graus5-Dec-00 13:59 
GeneralRe: Netbios Pin
Den8-Dec-00 3:06
Den8-Dec-00 3:06 
Generalcreate a template list class assignment please help Pin
5-Dec-00 10:12
suss5-Dec-00 10:12 
GeneralMFC Objective Edit Control inside ATL CWindowImpl class Pin
Alexander Klinsky5-Dec-00 8:50
Alexander Klinsky5-Dec-00 8:50 
QuestionHow to update running EXE? Pin
Matt Philmon5-Dec-00 8:19
Matt Philmon5-Dec-00 8:19 
AnswerRe: How to update running EXE? Pin
Jim Howard5-Dec-00 8:39
Jim Howard5-Dec-00 8:39 

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.