G
Gabriel Schreiber
Hi
this code:
#include <vector>
void f()
{
struct arg{};
std::vector<arg> v;
};
gets the error message:
: template-argument `f()::arg' uses local type `f()::arg'
: template argument 2 is invalid
can anyone explain this?
And: Is it possible in any way to instantiate templates with local
types?
TIA
Gabriel
this code:
#include <vector>
void f()
{
struct arg{};
std::vector<arg> v;
};
gets the error message:
: template-argument `f()::arg' uses local type `f()::arg'
: template argument 2 is invalid
can anyone explain this?
And: Is it possible in any way to instantiate templates with local
types?
TIA
Gabriel