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
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
:)
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....
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*
};
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Any ideas why it must be in namespace std?
Why cant I just specialize after
using namespace std....
Why cant I just specialize after
using namespace std....
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