C++0x support macros

Esben Mose Hansen kde at mosehansen.dk
Wed Jun 1 13:37:18 UTC 2011


On Wednesday 01 June 2011 14:28:03 Wolfgang Bangerth wrote:
> Milian,
> the three big issues with C++0x worth thinking about are:
> 
> - lots of new members in std::

You'd get those for free, since KDevelop is parsing headers. Provided that 
KDevelop can actually parse those new headers, of course

> - the really difficult one: auto. For example, can KDevelop determine the
> type of 'p' in
>     std::vector<X> v;
>     auto p = v.begin();

Given that KDevelop today gives the return type of begin() in a popup, I think 
it should be possible

>   and provide useful auto-completion for it? Likewise, how about this:
>     std::vector<X> v;
>     for (auto p : v) {...}

If the above works, this is should be comparatively easy. But we can be more 
evil:

auto f = [] { return 5; }
auto myvariable = f();

I'd be impressed if myvariable was shown as having type "int" :)

-- 
kind regards, Esben




More information about the KDevelop-devel mailing list