[Development] C++11 decltype magic with a container?

Stephen Kelly stephen.kelly at kdab.com
Thu May 23 17:24:35 CEST 2013


On Thursday, May 23, 2013 07:56:16 Thiago Macieira wrote:
> On quinta-feira, 23 de maio de 2013 16.12.27, Stephen Kelly wrote:
> > I was not referring to the patch in gerrit. I was referring to the code I
> > pasted. It contains a struct called 'A', and I made a note and a comment
> > about  enable_if.
> 
> Oh! Somehow I missed that!

Yes, I guessed that, which is why I asked you to re-read it several times :).

> 
> Yes, you need to add those enable_ifs. Or concepts :-)

I guess you also missed where I wrote "I also tried an enable_if, but that 
doesn't solve the problem either."

So, I was looking for other ideas, but I don't think there is any workable 
solution. Maybe looking for mapped_type, key_type and value_type on the 
T::value_type (recursively) might work, but it would be so ugly and only 
really partially working that I don't think I'll even try.

Thanks,

-- 
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- 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://lists.qt-project.org/pipermail/development/attachments/20130523/4af0356a/attachment.sig>


More information about the Development mailing list