[Development] C++11 for Examples

Thiago Macieira thiago.macieira at intel.com
Tue Mar 3 20:43:10 CET 2015

On Tuesday 03 March 2015 12:57:55 Matthew Woehlke wrote:
> On 2015-03-03 05:17, Koehne Kai wrote:
> > What's missing from the list IMO is using QObject::connect with
> > PointerToMemberFunction instead of SIGNAL(), SLOT().
> I thought that was just new in Qt5, and that it does *not* require
> C++11. The documentation seems to imply so, anyway:
>   "The number of arguments in the signal or slot are limited to 6 if the
> compiler does not support C++11 variadic templates."

The syntax is possible in C++98, but the greatest improvement of the syntax is 
the ability to connect to lambdas.

There's also the problem you mentioned of the limit of parameters. I would 
rather people not have to remember how many they can use, so we should 
restrict this to C++11.

> ...which brings up another potentially missing item; variadic templates.
> Not sure if any examples would benefit from those or not...

Unlikely, we don't create new template classes in our examples. There are also 
very few classes in the Qt sources that would benefit from it.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list