Topic: Defect Report: Initialization order of static data members of template classes unspecified


Author: "Jonathan H Lundquist" <jhl@sssonline.com>
Date: 09 Feb 01 07:23:22 GMT
Raw View
 [Moderator's note: this defect report has been
 forwarded to the C++ committee. -moderator(fjh).]

As far as I can tell the standard does not specifically address how the
initialization requirements interact with template instantiation for static
data members.  I suggest verbiage similar to the following be added either
to 3.6.2 [basic.start.init], or to 9.4.2 [class.static.data]:

Initialization of static data members of template classes shall be performed
during the initialization of static data members for the first translation
unit to have static initialization performed for which the template member
has been instantiated.  This requirement shall apply to both the static and
dynamic phases of initialization.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]