VS2005: explicit specialization error
I am getting error with below code while compiling with VS2005:
Code:
BEGIN_MESSAGE_MAP(CTreeDataCtrl<CLogicTreeData>, CTreeCtrl)
//{{AFX_MSG_MAP(CTreeDataCtrl)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
Error is as below:
error C2906: 'const AFX_MSGMAP *CTreeDataCtrl<T>::GetThisMessageMap(void)' : explicit specialization requires 'template <>'
I tried doing as below, but the error was not resolved:
Code:
BEGIN_MESSAGE_MAP(template<>CTreeDataCtrl<CLogicTreeData>, CTreeCtrl)
Note that the definition as in code is
Code:
template <class T>
class CTreeDataCtrl : public CTreeCtrl
{
.
.
}
class CTreeCtrl : public CWnd
{
.
.
}
Can anyone please shed some light on this?
Note that I am getting error at below line:
Code:
BEGIN_MESSAGE_MAP(CTreeDataCtrl<CLogicTreeData>, CTreeCtrl)
Re: VS2005: explicit specialization error
Check this: http://msdn.microsoft.com/en-us/libr...16(VS.80).aspx
I'm not sure if this feature is avalaible in VS2005.
Re: VS2005: explicit specialization error
Many Thanks. I changed it as below and and it compiled rightly.
Code:
BEGIN_TEMPLATE_MESSAGE_MAP (CTreeDataCtrl, CLogicTreeData, CTreeCtrl)