|
|
От: | Vodka | |
| Дата: | 21.08.06 13:22 | ||
| Оценка: | |||
struct X
{
template<typename T>
void f(const T* p)
{
p->v;
}
};
static const struct // V1
{
int v;
} v1[] = {
{1}
};
static const struct // V2
{
float v;
} v2[] = {
{1.0f}
};
int main()
{
X x;
x.f(v1); // (1)
// x.f(v2); // (2)
}