Title
Point of instantiation of incomplete class template
Status
drafting
Section
13.8.4.1 [temp.point]
Submitter
Richard Smith

Created on 2016-03-08.00:00:00 last changed 81 months ago

Messages

Date: 2016-12-15.00:00:00

Notes from the December, 2016 teleconference:

The consensus was that references to specializations before the template definition is seen are not points of instantiation.

Date: 2022-02-18.07:47:23

Consider:

  template<typename T> struct X;

  extern X<int> *p;
  void *q = +p; // #1, complete type affects semantics via ADL

  template<typename T> struct X {};
  X<int> x; // #2, ill-formed, X<int> is incomplete

According to the wording of issue 212, this program is ill-formed, because the single point of instantiation for X<int> is at #1, thus X<int> is an incomplete type even at #2 after the primary template has been completed.

History
Date User Action Args
2018-04-11 00:00:00adminsetstatus: open -> drafting
2017-02-06 00:00:00adminsetmessages: + msg5834
2016-03-08 00:00:00admincreate