Click here to Skip to main content
15,908,455 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Pointer to another Window Pin
Antti Keskinen11-Dec-03 7:10
Antti Keskinen11-Dec-03 7:10 
GeneralRe: Pointer to another Window Pin
David Crow10-Dec-03 7:47
David Crow10-Dec-03 7:47 
GeneralRe: Pointer to another Window Pin
Joel Lucsy11-Dec-03 4:08
Joel Lucsy11-Dec-03 4:08 
GeneralRe: Pointer to another Window Pin
tjkrz15-Dec-03 9:21
tjkrz15-Dec-03 9:21 
Generaltemplate design question Pin
pankajdaga10-Dec-03 6:30
pankajdaga10-Dec-03 6:30 
GeneralRe: template design question Pin
Jörgen Sigvardsson10-Dec-03 11:34
Jörgen Sigvardsson10-Dec-03 11:34 
GeneralRe: template design question Pin
pankajdaga10-Dec-03 12:50
pankajdaga10-Dec-03 12:50 
GeneralRe: template design question Pin
Andrew Walker10-Dec-03 12:44
Andrew Walker10-Dec-03 12:44 
pankajdaga wrote:
Am I missing a design detail here. Are these templated classes never supposed to be derived from. How can I make sure such heritance is safe (in keeping with the design principle here).

You're exacly correct, but see section 1.7 "Destructors of policy classes" for Alexandrescu's solution (so make policy classes destructors non-virtual and protected.

[edit]
Just to add a little more info - you can sucessfully create the object using new, but the subsequent call to delete will be a compiler error, because the base class destructor is protected.
[/edit]


If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.

Rudyard Kipling

GeneralRe: template design question Pin
pankajdaga10-Dec-03 12:52
pankajdaga10-Dec-03 12:52 
QuestionHyperthreading Windows API? Pin
solla10-Dec-03 6:03
solla10-Dec-03 6:03 
AnswerRe: Hyperthreading Windows API? Pin
valikac10-Dec-03 6:20
valikac10-Dec-03 6:20 
GeneralRe: Hyperthreading Windows API? Pin
solla10-Dec-03 6:24
solla10-Dec-03 6:24 
GeneralRe: Hyperthreading Windows API? Pin
David Crow10-Dec-03 8:50
David Crow10-Dec-03 8:50 
GeneralRe: Hyperthreading Windows API? Pin
solla11-Dec-03 1:43
solla11-Dec-03 1:43 
GeneralCreating and Using Static lib Pin
Anonymous10-Dec-03 5:31
Anonymous10-Dec-03 5:31 
GeneralRe: Creating and Using Static lib Pin
Larry J. Siddens10-Dec-03 6:00
Larry J. Siddens10-Dec-03 6:00 
GeneralRe: Creating and Using Static lib Pin
Chris Meech10-Dec-03 6:07
Chris Meech10-Dec-03 6:07 
GeneralMultithreading using _beginthread Pin
madmurdz10-Dec-03 4:54
madmurdz10-Dec-03 4:54 
GeneralRe: Multithreading using _beginthread Pin
Alexander M.,10-Dec-03 5:16
Alexander M.,10-Dec-03 5:16 
GeneralRe: Multithreading using _beginthread Pin
John M. Drescher10-Dec-03 5:38
John M. Drescher10-Dec-03 5:38 
GeneralRe: Multithreading using _beginthread Pin
valikac10-Dec-03 6:22
valikac10-Dec-03 6:22 
GeneralRe: Multithreading using _beginthread Pin
Jörgen Sigvardsson10-Dec-03 8:17
Jörgen Sigvardsson10-Dec-03 8:17 
GeneralRe: Multithreading using _beginthread Pin
Gary R. Wheeler10-Dec-03 15:11
Gary R. Wheeler10-Dec-03 15:11 
GeneralRe: Multithreading using _beginthread Pin
David Crow11-Dec-03 2:31
David Crow11-Dec-03 2:31 
GeneralRe: Multithreading using _beginthread Pin
Gary R. Wheeler11-Dec-03 10:21
Gary R. Wheeler11-Dec-03 10:21 

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.