Template Partial Specialization

G

George2

Hello everyone,


About Template Partial Specialization,

http://www.cprogramming.com/tutorial/template_specialization.html

sometimes in real case like below,

http://www.sgi.com/tech/stl/iterator_traits.html

there will be two definitions at the same time,

Code:
template <typename T>
class Foo {
}

template <typename T>
class Foo <T *>
{
}

In theory, compiler will match the latter one with first priority
compared with the 1st one.

My question is, I tihnk for basic data types it is easy to match,

example,

when we pass Foo <int*>, the latter one is matched and T is int. But
for arbitrary data types, like used data types, how could compiler
judge whether a type is pointer (when the latter template class should
be matched) or not a pointer (when the first template class should be
matched).


thanks in advance,
George
 
M

Mark Bluemel

George2 said:
Hello everyone,


About Template Partial Specialization,

And this has precisely what relationship to the C language?

This is your third message on comp.lang.c today, as far as I can see,
which discusses something totally irrelevant to comp.lang.c

You've been pointed to a more appropriate newsgroup.

If you only post and don't read, there's little point you bothering.

Welcome to my killfile.
 
S

santosh

Mark Bluemel said:
And this has precisely what relationship to the C language?

This is your third message on comp.lang.c today, as far as I can see,
which discusses something totally irrelevant to comp.lang.c

And in all, this is the sixth C++ question that the OP has posted to
comp.lang.c.
You've been pointed to a more appropriate newsgroup.

If you only post and don't read, there's little point you bothering.

Welcome to my killfile.

He's looking more and more like a troll.
 
J

Jack Klein

Hello everyone,

Are you a troll, or just thick?

As has been pointed out, this is the sixth question about the C++
language you have asked on comp.lang.c since November 11.

Five times before you have been told your question belongs in
comp.lang.c++.

So either you are trolling, or just plain too stupid to read. Don't
bother replying as to which it is, I won't see it. Like others here,
I have given you a well-earned place in my killfile.

*plonk*
About Template Partial Specialization,

No, about your trolling or stupidity.

[posted and mailed]

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top