I was having weird problems in my code so finally I got it down to this,
which doesn't compile:
#include <vector>
int main()
{
struct Test
{
int i;
};
std::vector< Test > MyTest;
}
In VC++ .net 2003 this gives me the error:
error C2926: 'main::Test' : types with no linkage cannot be used as template
arguments
If, however, I declare the structure globally (outside of main) it
compilers.
Is this something with VC++ or part of the standard?