--- Additional Comments From reichelt at gcc dot gnu dot org 2005-02-21
13:14 ---
Here's chapter and verse from the standard.
[9.4.2]/4 aka [class.static.data]/4:
If a static data member is of const integral or const enumeration type,
its declaration in the class definition can specify
--- Additional Comments From wwieser at gmx dot de 2005-02-20 00:49 ---
Subject: Re: Unresolved dependent "static const" symbol in template
On Sunday 20 February 2005 01:34, pinskia at gcc dot gnu dot org wrote:
> Yes you need to have declare the storage for the static variables (even
>
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-20
00:34 ---
(In reply to comment #3)
> Subject: Re: Unresolved dependent "static const" symbol in template
>
> Thanks for a REALLY quick reply!
>
> templatestruct A
> {
> static const T all_clr = T(0);
> static con
--- Additional Comments From wwieser at gmx dot de 2005-02-20 00:31 ---
Subject: Re: Unresolved dependent "static const" symbol in template
Thanks for a REALLY quick reply!
templatestruct A
{
static const T all_clr = T(0);
static const T all_set = ~all_clr;
};
int main()
{
A bf;
--- Additional Comments From wwieser at gmx dot de 2005-02-20 00:31 ---
Subject: Re: Unresolved dependent "static const" symbol in template
Thanks for a REALLY quick reply!
templatestruct A
{
static const T all_clr = T(0);
static const T all_set = ~all_clr;
};
int main()
{
A bf;
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-20
00:12 ---
Note the testcase is invalid code, this is only a missed optimization.
--
What|Removed |Added