dimanche 29 avril 2018

Seeking clarification on inline namespace

In cppreference, the following text is found:

Each member of an inline namespace can be partially specialized , explicitly instantiated or explicitly specialized as if it were a member of the enclosing namespace.

Note: the rule about specializations allows library versioning: different implementations of a library template may be defined in different inline namespaces, while still allowing the user to extend the parent namespace with an explicit specialization of the primary template.

What do these statements imply? Can someone explain by means of a simple example?

Aucun commentaire:

Enregistrer un commentaire