This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11847] [3.4 regression] reference does not work as template argument any more
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2003 18:46:05 -0000
- Subject: [Bug c++/11847] [3.4 regression] reference does not work as template argument any more
- References: <20030807183306.11847.James.W.Mckelvey@jpl.nasa.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11847
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|sparc-sun-solaris2.7 |
GCC host triplet|sparc-sun-solaris2.7 |
GCC target triplet|sparc-sun-solaris2.7 |
Last reconfirmed|0000-00-00 00:00:00 |2003-08-07 18:46:04
date| |
Summary|std::string as template |[3.4 regression] reference
|argument no longer works |does not work as template
| |argument any more
------- Additional Comments From bangerth at dealii dot org 2003-08-07 18:46 -------
Indeed, I can confirm this on linux as well. Here's a smaller snippet:
----------------------------
extern const int a;
template <const int&> class X {};
template <typename> struct Y {
X<a> x;
};
template struct Y<int>;
----------------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In instantiation of `Y<int>':
x.cc:9: instantiated from here
x.cc:6: error: could not convert template argument `&a' to `const int&'
This used to work, but doesn't anymore. Since it only happens if Y is
a template class, it seems as if this may have something to do with
two-stage name lookup.
W.