template specialization with array / unique_ptr

Milian Wolff mail at milianw.de
Mon Feb 20 15:58:41 UTC 2012


On Monday 20 February 2012 13:05:06 Milian Wolff wrote:
> Hey there,
> 
> I'm currently trying to fix https://bugs.kde.org/show_bug.cgi?id=294306 .
> I've fixed the type_visitor to take the array into account, such that the
> specialization is properly created with T[]. But it doesn't seem to be
> possible to mark an identifier as "array" instead of e.g. pointer or
> reference. This seems to be required though to ensure that instantiation
> finds the proper template though I think. I wonder how to fix this... Esp.
> for 4.3 without breaking the ABI for identifier, it doesn't seem to be
> possible - or?
> 
> Note: With my fix to type_visitor, unique_ptr<Foo>() will at least take the
> unspecialized version, i.e. the one with operator->(). But
> unique_ptr<int[]>() or similar will still break, since it cannot find the
> specialization with [] (see above).
> 
> Also regarding unique_ptr and probably other STL stuff: It uses SFINAE to
> figure out the return type (see unique_ptr::_Pointer) paired with decltype
> which doesn't seem to work yet... so more work ahead of me :-/
> 
> cheers

I've pushed some work towards it and will now try to look at the SFINAE 
thingy...
-- 
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/20120220/f1e85ac6/attachment.sig>


More information about the KDevelop-devel mailing list