[Bug c++/20098] Unresolved dependent "static const" symbol in template

wwieser at gmx dot de gcc-bugzilla@gcc.gnu.org
Sun Feb 20 13:34:00 GMT 2005


------- 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!

template<typename T>struct A
{
 static const T all_clr = T(0);
 static const T all_set = ~all_clr;
};

int main()
{
 A<int> bf;
 
 return(bf.all_set);
}

On Sunday 20 February 2005 01:12, pinskia at gcc dot gnu dot org wrote:
> Note the testcase is invalid code, 
>
Could you please elaborate on what exactly is invalid?

> this is only a missed optimization. 
>
(?? - The unresolved symbol is independent of the optimization level.)

Regards,
Wolfgang

------- 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!

template<typename T>struct A
{
 static const T all_clr = T(0);
 static const T all_set = ~all_clr;
};

int main()
{
 A<int> bf;
 
 return(bf.all_set);
}

On Sunday 20 February 2005 01:12, pinskia at gcc dot gnu dot org wrote:
> Note the testcase is invalid code, 
>
Could you please elaborate on what exactly is invalid?

> this is only a missed optimization. 
>
(?? - The unresolved symbol is independent of the optimization level.)

Regards,
Wolfgang


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20098



More information about the Gcc-bugs mailing list