using namespace not working

I am getting namespace collision between two different headers. One is defined under a specific namespace, and when referencing those symbols I use "using namespace <foo>;


Yet the compiler doesn't recognize the namespace and shoots out a bunch of errors and warnings. I finally settled for the foo::<symbol> syntax instead, but wonder what could cause the code to ignore a "using" declaration?


This is the layout:


namespace foo

{


template <typename T>

struct Matrix2 {

Matrix2()

{

x.x = 1; x.y = 0;

y.x = 0; y.y = 1;

}

Matrix2(const T* m)

{

x.x = m[0]; x.y = m[1];

y.x = m[2]; y.y = m[3];

}

vec2 x;

vec2 y;

};

};



And when using symbols from that header:


using namespace foo;


struct Matrix2 mymatrix;



And the compiler will reference another Matrix defination in another header. I finally punted and just used the scope-resolution syntax instead. Is there any issues with using namespace stuff with templates?

using namespace not working
 
 
Q