Can't build current KDevelop
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sat Nov 20 15:41:09 UTC 2004
On Saturday 20 November 2004 10:52, Richard Dale wrote:
> It's a problem with the 'extension' template class in kdevplugin.h:
>
> template <class Extension>
> Extension *extension(const QString &serviceType, const QString
> &constraint = "")
> {
> KDevPlugin *plugin = extension(serviceType, constraint);
> if (plugin)
> return static_cast<Extension*>(plugin);
> else
> return 0;
> }
I've been looking at this code, but I'm not enough of a C++ expert to see why
this code:
KDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( )
{
return extension<KDevAppFrontend>("KDevelop/AppFrontend");
}
Isn't equivalent to using a static_cast?
KDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( )
{
return static_cast<KDevAppFrontend*>(extension("KDevelop/AppFrontend"));
}
I'm using gcc 3.2.2:
gcc version 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a)
Is there a bug in its template handling of some sort?
-- Richard
More information about the KDevelop-devel
mailing list