|
|
От: |
Dmitriev Sergey Victorovich
|
|
| Дата: | 19.05.03 07:20 | ||
| Оценка: | |||
struct X
{
template<typename T, typename TT>
void RR(T t)
{
static_cast<TT*>(this)->R(t);
}
};
struct d : X
{
void R(int) {}
void R(float);
void foo()
{
RR<int,d>(2);
RR<float,d>(2.0f);
}
};
int main()
{
d().foo();
}