Click here to Skip to main content
15,885,869 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalusing CColorDialog Pin
Gita.Bairavi5-Mar-08 22:22
Gita.Bairavi5-Mar-08 22:22 
QuestionRe: using CColorDialog Pin
Rajkumar R5-Mar-08 22:47
Rajkumar R5-Mar-08 22:47 
Generaltemplate function instantiation Pin
George_George5-Mar-08 22:22
George_George5-Mar-08 22:22 
GeneralRe: template function instantiation Pin
CPallini5-Mar-08 22:35
mveCPallini5-Mar-08 22:35 
GeneralRe: template function instantiation Pin
George_George5-Mar-08 22:51
George_George5-Mar-08 22:51 
QuestionRe: template function instantiation Pin
CPallini5-Mar-08 22:53
mveCPallini5-Mar-08 22:53 
GeneralRe: template function instantiation Pin
George_George5-Mar-08 23:01
George_George5-Mar-08 23:01 
GeneralRe: template function instantiation Pin
CPallini5-Mar-08 23:23
mveCPallini5-Mar-08 23:23 
OK, things are more clear, at least to me, changing the sample into
template <class t=""> void f (T a) { g(a); }

void g(int x) { return;}


void h()
{
	extern void g (double);	
	f (2.5);
}
</class>


I made a test (defining void g (double)) into another source file. The result was that only int specialization of f was built by the compiler, confirming Bjarne point.
Now, while it is clear that g(double) is exposed by correnponding source file, maybe that its declaration make it scoped only into h() i.e. local.
I have to admit the point it is not so clear.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: template function instantiation Pin
George_George6-Mar-08 0:12
George_George6-Mar-08 0:12 
GeneralRe: template function instantiation Pin
toxcct5-Mar-08 23:53
toxcct5-Mar-08 23:53 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 0:11
George_George6-Mar-08 0:11 
GeneralRe: template function instantiation Pin
Rajkumar R5-Mar-08 23:30
Rajkumar R5-Mar-08 23:30 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 0:07
George_George6-Mar-08 0:07 
GeneralRe: template function instantiation Pin
Rajkumar R6-Mar-08 0:52
Rajkumar R6-Mar-08 0:52 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 0:59
George_George6-Mar-08 0:59 
GeneralRe: template function instantiation Pin
Rajkumar R6-Mar-08 1:08
Rajkumar R6-Mar-08 1:08 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 1:21
George_George6-Mar-08 1:21 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 0:29
George_George6-Mar-08 0:29 
AnswerRe: template function instantiation [modified] Pin
Rajkumar R6-Mar-08 1:00
Rajkumar R6-Mar-08 1:00 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 1:56
George_George6-Mar-08 1:56 
GeneralRe: template function instantiation Pin
Rajkumar R6-Mar-08 2:04
Rajkumar R6-Mar-08 2:04 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 2:08
George_George6-Mar-08 2:08 
GeneralRe: template function instantiation Pin
Rajkumar R6-Mar-08 2:23
Rajkumar R6-Mar-08 2:23 
GeneralRe: template function instantiation Pin
George_George6-Mar-08 15:11
George_George6-Mar-08 15:11 
Generaliterator for deque Pin
George_George5-Mar-08 22:00
George_George5-Mar-08 22:00 

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.