Всем доброго...
Может существует финт ушами чтобы заставить компилятор(VS 2008) догадаться, что я хочу здесь сделать?
template<class T>
struct struct_t
{
struct_t(const T& x):m_value(x)
{
}
T m_value;
};
template<class T>
void test_t(const struct_t<T>& x)
{
}
int _tmain(int argc, _TCHAR* argv[])
{
test_t(10);
}
выдает ошибку:
1>.\test.cpp(304) : error C2784: 'void test_t(const struct_t<T> &)' : could not deduce template argument for 'const struct_t<T> &' from 'int'
1> .\test.cpp(298) : see declaration of 'test_t'