Topic: Permit brace-encloded initializers for static consts in class
Author: llewelly.at@xmission.dot.com (llewelly)
Date: Thu, 27 May 2004 06:19:07 +0000 (UTC) Raw View
hyrosen@mail.com (Hyman Rosen) writes:
> Graeme Prentice wrote:
>> if the compiler allocated storage and initialization code in
>> every translation unit, each translation unit would have its own copy of
>> the array or member, unless the linker was able to remove multiple
>> occurrences
>
> This is already required behavior for templates,
> so it could work just as easily for classes.
This seems to be yet another place where a new feature (static members
of class templates) required increased support from an
implementation, but restrictions on an older feature (static
members of classes) meant to avoid similar increased support were
not relaxed.
---
[ 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.jamesd.demon.co.uk/csc/faq.html ]