Please explain a gcc weirdness

Johannes Sixt j.sixt at viscovery.net
Thu Jun 24 09:26:47 BST 2010


Am 6/23/2010 22:59, schrieb Thiago Macieira:
> Despite what you might think, when you wrote:
> 
> 	Nepomuk::Resource res( KUrl( uri ) );
> 
> you didn't declare an object of type Nepomuk::Resource called "res" and call 
> its constructor with a KUrl parameter.
> 
> You declared an external function (the "extern" keyword is optional) called 
> res that returns Nepmuk::Resource.
> 
> This is correct behaviour.
> 
> It's just one of those things that bite you once, then you remember forever.

It's called "most vexing parse", btw.

-- 
"Atomic objects are neither active nor radioactive." --
Programming Languages -- C++, Final Committee Draft (Doc.N3092)




More information about the kde-core-devel mailing list