On quarta-feira, 7 de março de 2012 19.36.17, Rohan McGovern wrote:
> Thanks, so can we use #pragma GCC diagnostic to selectively silence
> warnings like this?  There doesn't seem to be much precedent for it so
> far (just one usage I can find in qatomic.h).

We can do that to silence the warning.

However, the proper solution is to redesign the function in question so that
the bad code never appears on it. The STL solution for this is to use tag
types and indirect via another function call.

João knows all about this and he had a plan to implement this cleaner code at
one point.

That's why we need static_if in C++2x :-)

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to