|
|
От: | копатыч | |
| Дата: | 13.03.08 16:03 | ||
| Оценка: | |||
class TestClass<T>
{
T m_Value;
public static bool operator <(TestClass<T> x, TestClass<T> y)
{
//error! Operator '<' cannot be applied to operands of type 'T' and 'T'
//Вроде должен вызыватся свой < для T .... а вот если уже такого нет, то тогда alarm ... IMHO
return x.m_Value < y.m_Value ;
}
public static bool operator >(TestClass<T> x, TestClass<T> y)
{
return !(x<y);
}
//........................
}