[prev in list] [next in list] [prev in thread] [next in thread]
List: ms-dcom
Subject: Re: Template functions
From: Albert Pi <API () CABLEVISION ! COM>
Date: 2000-11-27 16:30:04
[Download RAW message or body]
Jeff:
Can you post your definition of the template function?
>>> Jeff Yates <jeff.yates@PIGROUP.CO.UK> 11/27 6:32 AM >>>
Hi,
This is slightly out of topic but is related to an ATL component I am
writing. I have a template function that has one parameter passed to it as
T* (templated). The resultant pointer is used in a smart pointer
(CComPtr<T>) and has properties Count and Item used. This works for one
interface with these two properties but not for another. I call the
function as Function(spThing.p... where spThing is a smart pointer for an
interface. As I say, this works for one interface with the appropriate
methods but not for another. Can anyone shed any light? I have VC++ 6 with
SP4 and W98 SE. I have looked the error up in MSDN October 2000 but it
isn't listed.
Here is what the compiler outputs:
error C2893: Failed to specialize function template 'long __thiscall
CClass::Function(T *,struct _TREEITEM *,class AnotherThing *,struct IUnknown
*)'
With the following template arguments:
'struct IMyInterface'
Help would be most appreciated as my colleagues and I are rather confused.
Jeff Yates
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe. Save time, search
the archives at http://discuss.microsoft.com/archives/index.html
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe. Save time, search
the archives at http://discuss.microsoft.com/archives/index.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic