Click here to Skip to main content
15,892,839 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC application has encountered a problem and need to close Pin
_AnsHUMAN_ 5-May-09 21:38
_AnsHUMAN_ 5-May-09 21:38 
AnswerRe: MFC application has encountered a problem and need to close Pin
ThatsAlok5-May-09 23:20
ThatsAlok5-May-09 23:20 
AnswerRe: MFC application has encountered a problem and need to close Pin
Hamid_RT5-May-09 23:28
Hamid_RT5-May-09 23:28 
GeneralRe: MFC application has encountered a problem and need to close Pin
ganesh.dp5-May-09 23:36
ganesh.dp5-May-09 23:36 
AnswerRe: MFC application has encountered a problem and need to close Pin
David Crow6-May-09 3:14
David Crow6-May-09 3:14 
QuestionPartial Specialization of Templated Class Member Function Pin
Jmuulian5-May-09 19:26
Jmuulian5-May-09 19:26 
AnswerRe: Partial Specialization of Templated Class Member Function Pin
«_Superman_»5-May-09 20:04
professional«_Superman_»5-May-09 20:04 
AnswerRe: Partial Specialization of Templated Class Member Function Pin
Stuart Dootson6-May-09 2:14
professionalStuart Dootson6-May-09 2:14 
Jmuulian wrote:
As far as I can determine, specializing the member function only works if it has a single template parameter, like so:


No, it's because it is fully specialised. The compiler will implicitly instantiate the class for that template parameter and specialise the method (see 14.7.3p4 of the 1998 C++ standard).

Jmuulian wrote:
Can anyone explain how I can apply this logic to the case of multiple template arguments? The following code, by way of example, does not compile.

template< class X, int N >
class Foo
{
public:
int GetNumber() const { return 42; }
};

template < class X, int N >
int Foo< X, N >::GetNumber() const { return 42; }

template < class X >
int Foo< X, 5 >::GetNumber() const { return 69; }



These are attempted partial specialisations. Trouble is, the template parameters are on the class, not the method, so you have to partially specialise the class, not just the method. To do what you want, the compiler would have to implicitly partially instantiate the class template - it won't do that.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionOpening a Visual Studio .NET application in Visual Studio C++ Pin
SivaGK5-May-09 19:26
SivaGK5-May-09 19:26 
AnswerRe: Opening a Visual Studio .NET application in Visual Studio C++ Pin
«_Superman_»5-May-09 19:29
professional«_Superman_»5-May-09 19:29 
AnswerRe: Opening a Visual Studio .NET application in Visual Studio C++ Pin
_AnsHUMAN_ 5-May-09 19:47
_AnsHUMAN_ 5-May-09 19:47 
QuestionOne doubt Pin
Deepu Antony5-May-09 19:12
Deepu Antony5-May-09 19:12 
AnswerRe: One doubt Pin
«_Superman_»5-May-09 19:27
professional«_Superman_»5-May-09 19:27 
GeneralRe: One doubt Pin
Deepu Antony5-May-09 19:47
Deepu Antony5-May-09 19:47 
GeneralRe: One doubt Pin
«_Superman_»5-May-09 19:53
professional«_Superman_»5-May-09 19:53 
GeneralRe: One doubt Pin
Deepu Antony5-May-09 20:11
Deepu Antony5-May-09 20:11 
AnswerRe: One doubt Pin
Taran95-May-09 21:35
Taran95-May-09 21:35 
AnswerRe: One doubt Pin
KarstenK5-May-09 23:16
mveKarstenK5-May-09 23:16 
AnswerRe: One doubt Pin
Stuart Dootson6-May-09 2:16
professionalStuart Dootson6-May-09 2:16 
AnswerRe: One doubt Pin
David Crow6-May-09 3:15
David Crow6-May-09 3:15 
Questionin CExplorer1 class, how to post your form data to the server,as login data. Pin
cwj_5-May-09 16:20
cwj_5-May-09 16:20 
AnswerRe: in CExplorer1 class, how to post your form data to the server,as login data. Pin
Madhu Nair5-May-09 18:59
Madhu Nair5-May-09 18:59 
QuestionWhen IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 13:28
ForNow5-May-09 13:28 
AnswerRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
Stuart Dootson5-May-09 14:41
professionalStuart Dootson5-May-09 14:41 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 14:51
ForNow5-May-09 14:51 

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.