Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Template Partial Specialization

Reply
Thread Tools

Template Partial Specialization

 
 
George2
Guest
Posts: n/a
 
      11-19-2007
Hello everyone,


About Template Partial Specialization,

http://www.cprogramming.com/tutorial...alization.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
 
Reply With Quote
 
 
 
 
Mark Bluemel
Guest
Posts: n/a
 
      11-19-2007
George2 wrote:
> 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.
 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      11-19-2007
In article <fhscb0$61i$(E-Mail Removed)>, Mark Bluemel
<(E-Mail Removed)> wrote on Monday 19 Nov 2007 9:36 pm:

> George2 wrote:
>> 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


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.

 
Reply With Quote
 
Mark Bluemel
Guest
Posts: n/a
 
      11-19-2007
santosh wrote:
(about George2)

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


In which case my killfile is an ideal place for him.
 
Reply With Quote
 
Jack Klein
Guest
Posts: n/a
 
      11-19-2007
On Mon, 19 Nov 2007 07:59:22 -0800 (PST), George2
<(E-Mail Removed)> wrote in comp.lang.c:

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Template template partial specialization Hizo C++ 17 03-07-2011 08:09 AM
how to do partial specialization template for non member method template vj C++ 1 12-20-2010 11:57 AM
syntax problem for partial template specialization for a template class. toton C++ 1 12-28-2006 04:08 PM
template specialization overriding non-specialization? Joseph Turian C++ 2 04-16-2006 02:46 PM
template partial specialization Chandra Shekhar Kumar C++ 17 06-25-2003 03:35 PM



Advertisments