J
jn
Hi everyone,
I was trying to implement a design when I've found what seems a
limitation of standard C++. I can't specialize an inner class in this
way:
template <class ARG>
template <>
class Outer<ARG>::Inner<int>
{
//...
};
Actually, I was doing something more complex, in which the explicit
specialization was not on 'int', but on Outer<ARG>, so actually I was
trying to provide an explicit specialization for the case when the
argument to the inner template matched the outer one.
I will be working around this with a kludge, performing several
fully-explicit specializations for each of he different ARG's involved
(there are only 2 now and there will be 4 or 5 later on). But, I'd like
to know whether there is any construct in C++ by which I can detect
matching template arguments and provide a specialization in that case
-- maybe that way I'd be able to use a better hack^H^H^H^H workaround.
Thanks in advance,
J
I was trying to implement a design when I've found what seems a
limitation of standard C++. I can't specialize an inner class in this
way:
template <class ARG>
template <>
class Outer<ARG>::Inner<int>
{
//...
};
Actually, I was doing something more complex, in which the explicit
specialization was not on 'int', but on Outer<ARG>, so actually I was
trying to provide an explicit specialization for the case when the
argument to the inner template matched the outer one.
I will be working around this with a kludge, performing several
fully-explicit specializations for each of he different ARG's involved
(there are only 2 now and there will be 4 or 5 later on). But, I'd like
to know whether there is any construct in C++ by which I can detect
matching template arguments and provide a specialization in that case
-- maybe that way I'd be able to use a better hack^H^H^H^H workaround.
Thanks in advance,
J