This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

1157. Local types can now instantiate templates

Section: 16.4.5.2.1 [namespace.std] Status: C++11 Submitter: LWG Opened: 2009-06-28 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [namespace.std].

View all issues with C++11 status.

Discussion:

Addresses UK 175

Description

Local types can now be used to instantiate templates, but don't have external linkage.

Suggestion

Remove the reference to external linkage.

Notes

We accept the proposed solution. Martin will draft an issue.

[ 2009-07-28 Alisdair provided wording. ]

[ 2009-10 Santa Cruz: ]

Moved to Ready.

Proposed resolution:

16.4.5.2.1 [namespace.std]

Strike "of external linkage" in p1 and p2:

-1- The behavior of a C++ program is undefined if it adds declarations or definitions to namespace std or to a namespace within namespace std unless otherwise specified. A program may add a concept map for any standard library concept or a template specialization for any standard library template to namespace std only if the declaration depends on a user-defined type of external linkage and the specialization meets the standard library requirements for the original template and is not explicitly prohibited.179

-2- The behavior of a C++ program is undefined if it declares

A program may explicitly instantiate a template defined in the standard library only if the declaration depends on the name of a user-defined type of external linkage and the instantiation meets the standard library requirements for the original template.