Template Specialisation
Just a quickie.
Consider
template class A
{...}
Can A be specialised as where X is any class via a single definition?
That is, do all specialisation template arguments need to be known at compile time or can the templated arguments be templated themselves?
I ask because I can specialise template A for instances
A, that is a pointer type as the argument.
Thanks in advance.
quote:Original post by Chris Hare
Consider
template <class L, class R> class A
{...}
Can A be specialised as <int, X> where X is any class via a single definition?
Not sure if that''s what you are asking, but you can partially specialize
A
with int
as the first template parameter using a declaration such as
template <class R> class A<int,R>
{...}
Yes, there are missing < & >s for some reason, but spock answered the question anyway. Thanks spock.
Wizza Wuzza?
Wizza Wuzza?
You''re welcome. Those characters will show up if you use HTML entities - replace < with
<
and > with >
.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement