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

Stephen Kelly stephen.kelly at kdab.com
Thu May 23 16:12:27 CEST 2013


On Wednesday, May 22, 2013 12:24:39 Thiago Macieira wrote:
> On quarta-feira, 22 de maio de 2013 19.34.49, Stephen Kelly wrote:
> > > The operator exists and there's nothing preventing it from existing. The
> > > problem is that the operator exists but can't be used.
> > 
> > Yes.
> > 
> > > It does. You need to make sure that there's an enable_if in the function
> > > you're trying to detect. You can't detect if the function compiles.
> > 
> > Sorry, I don't see how that suggestion is different from the code I posted
> > in my initial mail.
> 
> There are no changes to qpair.h in your change. I am asking you to make the
> change to QPair and all the containers so that they std::enable_if the
> operator== if and only if the value_type is equality-comparable.

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.

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/65de8311/attachment.sig>


More information about the Development mailing list