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:48:27 -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
------- Additional Comments From bangerth at dealii dot org 2003-08-07 18:48 -------
Just a further clue that this might have something to do with
two-stage name lookup: if I make the variable template
dependent, then the code compiles again. Here's an example:
---------------------------
template <typename T> struct A {
static const T a;
};
template <const int&> class X {};
template <typename T> struct Y {
X<A<T>::a> x;
};
template struct Y<int>;
-----------------------------------
W.