Am Freitag, 26. Februar 2016, 09:02:27 CET schrieb Thiago Macieira: > On quinta-feira, 25 de fevereiro de 2016 18:36:16 PST Olivier Goffart wrote: > > The parser need to be adapted if we want to support trailing type for > > signals/ slots/Q_INVOKABLE; or C++11 attributes; decltype as argument type > > for invokable; or fancy default arguments. There might be other things. > > Is there value in doing that for non-template classes and members? > > It's probably the same discussion as the almost-always-auto we had before, > but since we're talking about the public interface of something, I'd expect > people to write their types more often than just relying on the compiler to > guess it.
We are talking about about user's code. They might have a style guide that says that every function need to use trailing return types (for consistency). They may also want to do stuff like Q_INVOKABLE auto userName(int userId) { return m_users.value(userId).name; } It's convinient. You might not like the use of auto, but it is not a good reason to forbid its use to Qt users. They see this as a limitation of moc. -- Olivier Woboq - Qt services and support - https://woboq.com - https://code.woboq.org _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development