[Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 5 21:54:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list