This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52036] C++11 allows template parameters to have internal linkage


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

--- Comment #4 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-01-29 17:28:14 UTC ---
(In reply to comment #3)
> However compilation still fails if pi is given internal linkage by declaring it > static, i.e.
> 
> int main()
> {
>   static constexpr float pi = 3.14;
> 
> Or even:
> 
> namespace {
>   static constexpr float pi = 3.14;
> }

I agree that both examples should work and that the lack of that is a bug when
compiled in C++11 mode. Paolo, this bug should be reopened.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]