This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52036] C++11 allows template parameters to have internal linkage
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 13:59:50 +0000
- Subject: [Bug c++/52036] C++11 allows template parameters to have internal linkage
- Auto-submitted: auto-generated
- References: <bug-52036-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52036
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-01-29 13:59:50 UTC ---
Yes, C++11 has relaxed the constraints and supports variables of internal
linkage as well. E.g. a variable declared with the static keyword in namespace
scope is feasible now. But your example does not provide a variable of either
internal or external linkage: Variable pi is an automatic variable and thus has
*no* linkage at all. Those are no valid template arguments in C++11 either.
Without any form of linkage, a compiler cannot associate an address constant or
reference constant with the variable.