G
Grahamo
Hi,
I've written a custom Iterator and managed to get things working ok.
I'm looking to see if I can reduce the amount of template instantiation
in my code however (borland gives an out of memory when compiling the
whole app).
template <class T >
class compareGreater // (T p1, T p2)
{
bool operator()( T& p1, T& p2)
{
// does comparison by calling operator< on types T
}
};
I have many types T in this codebase and I would like, if possible, to
prevent a new compareGreater<T> being instantiated for all types.
Instead I'd like all containers to use a single generic, "generic"
compareGreater routine. Is that possible?
thanks
G
I've written a custom Iterator and managed to get things working ok.
I'm looking to see if I can reduce the amount of template instantiation
in my code however (borland gives an out of memory when compiling the
whole app).
template <class T >
class compareGreater // (T p1, T p2)
{
bool operator()( T& p1, T& p2)
{
// does comparison by calling operator< on types T
}
};
I have many types T in this codebase and I would like, if possible, to
prevent a new compareGreater<T> being instantiated for all types.
Instead I'd like all containers to use a single generic, "generic"
compareGreater routine. Is that possible?
thanks
G