DUChain support of defaulted/deleted functions again

Milian Wolff mail at milianw.de
Sun Jun 19 18:38:57 UTC 2011


Wolfgang Bangerth, 19.06.2011:
> > - I can't think of an example of using =default on a non-member function
> > generally, it's not that clear to me what can and what cannot be
> > defaulted. a whitelist would be cool, or if someone could point me to
> > the correct part in the spec that defines this
> 
> =default only makes sense if the compiler can know how to generate a
> particular version. This is only true for constructors, destructors, and
> copy operators as well as operator new/delete.
> 
> According to N3242, section 8.4.2, =default is indeed restricted to
> "special member functions", a term defined in section 12.

A great, I did notice that in 8.4.2, but it is missing the link to section 12, 
thanks for giving me the hint.

> > I just don't know whether putting it directly into Declaration is a good
> > place. For one thing this is a pure C++0x feature, I don't know of any
> > other language with a similar feature. To make matters worse only
> > FunctionDeclarations can be deleted in C++0x... If preferred I could
> > simply create a CppFunctionDeclaration that also tracks the
> > isSignal/isSlot and thus cleans our API a bit of Cpp-Isms...
> 
> In GCC's language-independent internal representation of functions and
> similar things, they store some information in "lang_flags" -- essentially
> bits in their data structures that are interpreted differently by
> different language front ends. They have a generic name, and are accessed
> by (global, not member) functions in the front end that are named to
> indicate what the meaning of this generically named flag is in the
> language front end currently in use.

Well thanks, but imo this does not apply to KDevelop. We can have language 
dependent declarations and types and use that already where applicable. But 
since Cpp was the crash-test-dummy for developing the biggest part of the 
DUChain API there are some cpp-isms left-over.

Anyways, I'd like to hear the feedback from KDevplatform API users and 
developers on where you want me to put the above discussed feature :)
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110619/2b37a9ff/attachment-0001.sig>


More information about the KDevelop-devel mailing list