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

C / C++ / MFC

 
GeneralFailed to initialize object in a constructor Pin
cydd7-Mar-08 23:55
cydd7-Mar-08 23:55 
AnswerRe: Failed to initialize object in a constructor [modified] Pin
Rajkumar R8-Mar-08 0:00
Rajkumar R8-Mar-08 0:00 
GeneralRe: Failed to initialize object in a constructor Pin
cydd8-Mar-08 22:37
cydd8-Mar-08 22:37 
Generalgraph plotting.. Pin
Member 47738777-Mar-08 23:00
Member 47738777-Mar-08 23:00 
GeneralRe: graph plotting.. Pin
CPallini7-Mar-08 23:35
mveCPallini7-Mar-08 23:35 
GeneralRe: graph plotting.. Pin
Member 47738778-Mar-08 0:51
Member 47738778-Mar-08 0:51 
Generalinstantiation point discussion Pin
George_George7-Mar-08 22:24
George_George7-Mar-08 22:24 
GeneralRe: instantiation point discussion Pin
Rajkumar R7-Mar-08 22:43
Rajkumar R7-Mar-08 22:43 
i didn't read you discussion.


George_George wrote:
2. if you agree with Bjarne's points, g(int) -- declaration only -- will instantise function f to f<int>,

yes, i agree with bjarne's point

AFAIU, template instantiation is compile time process, declaration is sufficient for compiler to deduce a template function. with "not declaration" you mean definition of function g(int), if not defined linker will catch the unresolved symbol, but in the compilation time itself template instantiation happens, declaration is sufficient. (except the case of inline function, where definition should be visible at compile stage).


George_George wrote:
could you also provide some code to prove please?

your example is quite enough to prove, just compile the code (don't build, i mean don't link), the code successfully compiles.
GeneralRe: instantiation point discussion Pin
George_George7-Mar-08 23:01
George_George7-Mar-08 23:01 
GeneralRe: instantiation point discussion Pin
Rajkumar R7-Mar-08 23:23
Rajkumar R7-Mar-08 23:23 
GeneralRe: instantiation point discussion Pin
George_George8-Mar-08 22:03
George_George8-Mar-08 22:03 
GeneralRe: instantiation point discussion Pin
Rajkumar R9-Mar-08 2:07
Rajkumar R9-Mar-08 2:07 
GeneralRe: instantiation point discussion Pin
George_George9-Mar-08 2:24
George_George9-Mar-08 2:24 
GeneralRe: instantiation point discussion Pin
Rajkumar R9-Mar-08 3:01
Rajkumar R9-Mar-08 3:01 
GeneralRe: instantiation point discussion Pin
George_George9-Mar-08 3:15
George_George9-Mar-08 3:15 
AnswerRe: instantiation point discussion Pin
Rajkumar R9-Mar-08 3:27
Rajkumar R9-Mar-08 3:27 
GeneralRe: instantiation point discussion Pin
George_George9-Mar-08 15:28
George_George9-Mar-08 15:28 
GeneralMSDN template sample Pin
George_George7-Mar-08 20:36
George_George7-Mar-08 20:36 
GeneralRe: MSDN template sample Pin
CPallini7-Mar-08 23:29
mveCPallini7-Mar-08 23:29 
GeneralRe: MSDN template sample Pin
George_George8-Mar-08 21:59
George_George8-Mar-08 21:59 
GeneralRe: MSDN template sample Pin
CPallini8-Mar-08 22:55
mveCPallini8-Mar-08 22:55 
GeneralRe: MSDN template sample Pin
George_George9-Mar-08 2:05
George_George9-Mar-08 2:05 
GeneralRe: MSDN template sample Pin
CPallini9-Mar-08 3:57
mveCPallini9-Mar-08 3:57 
GeneralRe: MSDN template sample Pin
George_George9-Mar-08 15:22
George_George9-Mar-08 15:22 
GeneralRe: MSDN template sample Pin
CPallini9-Mar-08 22:08
mveCPallini9-Mar-08 22:08 

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.