This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Feb 2004 21:54:20 -0000
- Subject: [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches
- References: <20040205205432.14032.tschwinger@neoscientists.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-02-05 21:54 -------
And just as a sidenote: this bug may be related to the fact
that we reject this explicit (full) specialization in this code:
-------------------------
template <bool B1> struct outer {
template <bool B2>
struct inner {
static int f() { return inner<!B2>::N; };
};
template <>
struct inner<B1> {
static const int N = 1;
};
};
int i = outer<false>::inner<true>::f();
----------------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ x.cc -c
x.cc:7: error: invalid explicit specialization before '>' token
x.cc:7: error: explicit specialization in non-namespace scope `struct
outer<B1>'
x.cc:7: error: enclosing class templates are not explicitly specialized
g/x>
g/x> icc -c x.cc
g/x>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032