Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How are unknown attributes supposed to be treated before C++17?

cppreference says that

All attributes unknown to an implementation are ignored without causing an error.

… but that this edict was introduced in C++17. What about earlier versions of C++? Are unknown attributes supposed to be errors? Is it implementation-defined what to do with them?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It was implementation-defined since its introduction in C++11.

See [dcl.attr.grammar]/5:

For an attribute-token not specified in this International Standard, the behavior is implementation-defined.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading