Title
Type of a specialization of a variable template
Status
nad
Section
13.9.4 [temp.expl.spec]
Submitter
Larisse Voufo

Created on 2013-08-05.00:00:00 last changed 136 months ago

Messages

Date: 2013-09-15.00:00:00

Rationale (September, 2013):

CWG affirmed that there is no required relationship between the type of the template and the type of a partial or explicit specialization of that template.

Date: 2022-11-20.07:54:16

It is not clear whether there is any necessary relationship between the type specified in a primary variable template declaration and the type in an explicit or partial specialization. For example:

  template<typename T> T var = T();
  template<> char var<char> = 'a';           // #1.
  template<typename T> T* var<T> = new T();  // #2.
  template<> float var<int> = 1.5;           // #3.
History
Date User Action Args
2013-10-14 00:00:00adminsetmessages: + msg4711
2013-10-14 00:00:00adminsetstatus: open -> nad
2013-08-05 00:00:00admincreate