P
Patrick Leslie Polzer
Hi,
I have a problem with iterators at compile-time. The following program
will fail to compile:
#include <vector>
using std::vector;
template <typename T>
struct Test
{
};
template <typename T>
struct TestUser
{
vector<Test<T> > tests;
void test()
{
vector<Test<T> >::const_iterator iter; //line 18
}
};
int main()
{
return(0);
}
because:
tmpltest.cxx:18: error: expected `;' before "iter"
What's that? Is vector<Test<T> >::const_iterator an unknown type?
I hope someone can shed some light on this...
I have a problem with iterators at compile-time. The following program
will fail to compile:
#include <vector>
using std::vector;
template <typename T>
struct Test
{
};
template <typename T>
struct TestUser
{
vector<Test<T> > tests;
void test()
{
vector<Test<T> >::const_iterator iter; //line 18
}
};
int main()
{
return(0);
}
because:
tmpltest.cxx:18: error: expected `;' before "iter"
What's that? Is vector<Test<T> >::const_iterator an unknown type?
I hope someone can shed some light on this...