On Wed, 26 Feb 2020 at 18:45, Benjamin TERRIER <b.terr...@gmail.com> wrote:
> I would like the idea of using attributes for this. However, compilers are 
> allowed to warn for unknown attributes, which is useful to detect typos.
> This means that we would get a warning for each usage of [[qt::emit]]. So 
> unless there is a way to disable unknown attribute warnings for a specific 
> set of custom attributes this will be a pain.

That's debatable. [dcl.attr]/6 says

Any attribute-token that is not recognized by the implementation is ignored.

In general, implementations can still warn about pretty much whatever
they please, especially considering
that their default modes are not strictly conforming.

The compilers we plan to support in Qt 6 do warn about unknown
attributes, so the allowance point is kinda
theoretical.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to