E
er
Hi all,
I have some build errors related to template templates that once
compiled fine, but not anymore. i'm guessing this might be due to an
upgrade in gcc (i upgraded from ubuntu 7.10 to 8.04).
suppose i have a template class like this:
template<typename ValueType,template<typename> class F>
struct A{
typedef F<ValueType> f_type;
};
and in a source file I have:
typedef A<ValueType,std::vector> a_type;
This used to work fine, not anymore:
expected a template of type ‘template<class> class F’, got
‘template<class _Tp, class _Alloc> class std::vector’
I understand this error message, it's just that _Alloc usually has a
default, which previously allowed the definition of A as above, not
anymore! I have to refactor my code, any suggestion?
Thanks!
I have some build errors related to template templates that once
compiled fine, but not anymore. i'm guessing this might be due to an
upgrade in gcc (i upgraded from ubuntu 7.10 to 8.04).
suppose i have a template class like this:
template<typename ValueType,template<typename> class F>
struct A{
typedef F<ValueType> f_type;
};
and in a source file I have:
typedef A<ValueType,std::vector> a_type;
This used to work fine, not anymore:
expected a template of type ‘template<class> class F’, got
‘template<class _Tp, class _Alloc> class std::vector’
I understand this error message, it's just that _Alloc usually has a
default, which previously allowed the definition of A as above, not
anymore! I have to refactor my code, any suggestion?
Thanks!