|
Boost : |
From: Geurt Vos (G.Vos_at_[hidden])
Date: 2002-02-14 05:16:01
I have a properties implementation ready for upload.
However, in its current form most compilers can't
handle it. I'm uncertain whether this is due to bad
language support or because of non-standard code.
Now, I will try to work around the issue (which should
be possible), but I would like to know who's wrong (for
a side note in the code, etc.). First note that I posted
this question to c.l.c++.m not so long ago, but didn't
get any response. Basically it comes down to this:
template <typename T, T> class A { };
template <class T> class B;
template <typename T, T v>
class B<A<T,v> > {
};
Both Borland C++ 5.5.1 and GCC 3.0.2 think it's cool.
GCC 2.95.2 simply can't find the specialization, and
both Intel C++ 5.0 and Comeau C++ 4.2.45.2 error out
with:
--- the type of partial specialization template parameter constant "v" depends on another template parameter --- Section 14.5.4 [temp.class.spec], note 9 reads: -- The type of a template parameter corresponding to a specialized nontype argument shall not be dependent on a parameter of the specialization. -- In my case I am not specializing a nontype argument but a type argument, so this part (which is the only relevant one I could find) does not apply. In other words, the standard doesn't say it's invalid to use a dependent nontype in a specialization of a type argument, correct? TIA, Geurt
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk