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<typena me ValueType,templ ate<typenamecla ss F>
struct A{
typedef F<ValueTypef_ty pe;
};
and in a source file I have:
typedef A<ValueType,std ::vectora_type;
This used to work fine, not anymore:
expected a template of type ‘template<class class F’, got
‘template<class _Tp, class _Allocclass 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<typena me ValueType,templ ate<typenamecla ss F>
struct A{
typedef F<ValueTypef_ty pe;
};
and in a source file I have:
typedef A<ValueType,std ::vectora_type;
This used to work fine, not anymore:
expected a template of type ‘template<class class F’, got
‘template<class _Tp, class _Allocclass 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!
Comment