Link to home
Start Free TrialLog in
Avatar of LucHoltkamp
LucHoltkamp

asked on

Why can't I specialize on greater<> ???

See https://www.experts-exchange.com/jsp/qShow.jsp?ta=cplusprog&qid=10297032 

In VC6 I can't specialize on the template greater<> from STL?
Read the above question history, and let me know what you think about it....

Luc
Avatar of ntdragon
ntdragon

when you are using tamplate functions or class's
u should write before them
template<class t>

i mean if you"ll take stack.h
there is a class stack
then if i want to make a stack of int i should write:

stack<int> S;//stack of int's

and in the h file

is writen
template<class T>
class stack{
....
};

i hope i understood your question right
and answer it


Avatar of LucHoltkamp

ASKER

Sorry ntdragon, but did you read the question
https://www.experts-exchange.com/jsp/qShow.jsp?ta=cplusprog&qid=10297032   ?

This is not what I asked....
Hi ntdragon,

This is about template (partial) specialization:

template<typename T1, typename T2>
class A
{
    // general template
};

template<typename T>
class A<T, T*>
{
   // specialization for instances where T2 has type T1*
};
ASKER CERTIFIED SOLUTION
Avatar of KangaRoo
KangaRoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any ideas why it must be in namespace std?
Why cant I just specialize after
using namespace std....