C++2011: inline namespaces

Milian Wolff mail at milianw.de
Mon Jul 11 17:59:31 UTC 2011


On Tuesday 05 July 2011 21:19:37 Milian Wolff wrote:
> Hey there!
> I would like to get some help on implementing inline namespaces in 
theKDevelop Cpp plugin. The parser handles them now properly (c++0x branch 
ofkdevelop) but I am lost when it comes to implementing the lookup changes.
> See also: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm
> Foremost it would help me if we could come up with a list of examples I 
canuse for writing unit tests. A simple one is probably:
> inline namespace A { int i = 1; }int b = i + 2;
> according to the new spec this works due to the implicit using declaration
> of namespace A in the global namespace.
> Then regarding explicit instantiation (see 14.7.2/6):
> inline namespace N {template<class T> class > { void mf() {} };}template 
class Y<int>;
> this should now work contrary to a not-inlined namespace if I'm 
notmistaken...
> Same for explicit specialization (compare to 14.7.3/8):
> inline namespace N {  template<class T> class Y {};}
> template<> class Y<double> {};
> So far so good. But I'm not so sure about the implications - and where 
tochange what code. Furthermore the point about explicit qualification is
> unclear to me.
> Hence, please help me and give me a hand in getting this done.
> Bye

*push* - David, could you please tell me where to look for code that is 
responsible for the lookup? General ideas on how to implement this would be 
welcome as well.

bye
-- 
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/20110711/f69b474c/attachment.sig>


More information about the KDevelop-devel mailing list