[Development] Q_COMPILER_VARIADIC_TEMPLATES since Qt 5.7

Александр Волков a.volkov at rusbitech.ru
Thu Dec 22 12:29:11 CET 2016


22.12.2016 14:10, Thiago Macieira пишет:
> qOverload requires C++14 variable templates.
>
> QOverload could be used, but I'd rather you didn't use it in the Qt sources.
> It's a bit ugly.
It's not uglier than static_cast. Compare:
connect(offsetSpinBox, static_cast<void 
(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
vs
connect(offsetSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),

At least it should be used in the examples, so Qt users could search the 
documentation and
find out that there is qOverload.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161222/47d17def/attachment.html>


More information about the Development mailing list