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

### 3177. Limit permission to specialize variable templates to program-defined types

Section: 16.4.5.2.1 [namespace.std] Status: New Submitter: Johel Ernesto Guerrero Peña Opened: 2018-12-11 Last modified: 2018-12-21

Priority: 3

View other active issues in [namespace.std].

View all other issues in [namespace.std].

View all issues with New status.

Discussion:

The permission denoted by [namespace.std]/3 should be limited to program-defined types.

[2018-12-21 Reflector prioritization]

Set Priority to 3

Proposed resolution:

This wording is relative to N4791.

1. Change 16.4.5.2.1 [namespace.std] as indicated:

   > -2- Unless explicitly prohibited, a program may add a template specialization for any standard library class template to namespace `std` provided that (a) the added declaration depends on at least one program-defined type and (b) the specialization meets the standard library requirements for the original template.(footnote 174)

   > -3- The behavior of a C++ program is undefined if it declares an explicit or partial specialization of any standard library variable template, except where explicitly permitted by the specification of that variable template, provided that the added declaration depends on at least one program-defined type.