Namespaces/enumerators attributes

This lessons discusses attributes when they were applied on namespaces/enumerators, the problems with it in C++ 11 and the fix C++ 17 offers.

We'll cover the following

A look at attributes

The idea for attributes in C++11 was to be able to apply them to all sensible places like classes, functions, variables, typedefs, templates, enumerations… But there was an issue in the specification that blocked attributes when they were applied on namespaces or enumerators.

This is now fixed in C++17. We can now write:

Get hands-on with 1200+ tech skills courses.