H
helfer thomas
Another "template newbie" question. I would like to write the following
code :
-------------
template<typename T, typename U>
struct Test{
static const bool Cond;
};
template<typename T, typename U>
const bool Test<T,U>::Cond = false;
template<typename T>
const bool Test<T,T>::Cond = true;
------------------
As you might expect, it doesn't work, at least under Microsoft Visual
C++ 2005 Express Edition. More precisely, it gives me the following
error at the last line of the code :
error C3860: template argument list following class template name must
list parameters in the order used in template parameter list
Can someboby explain me what I have done wrong ?
Sincerely,
Helfer Thomas
code :
-------------
template<typename T, typename U>
struct Test{
static const bool Cond;
};
template<typename T, typename U>
const bool Test<T,U>::Cond = false;
template<typename T>
const bool Test<T,T>::Cond = true;
------------------
As you might expect, it doesn't work, at least under Microsoft Visual
C++ 2005 Express Edition. More precisely, it gives me the following
error at the last line of the code :
error C3860: template argument list following class template name must
list parameters in the order used in template parameter list
Can someboby explain me what I have done wrong ?
Sincerely,
Helfer Thomas