Robert suggested that I put my opAssign method as:

void opAssign (T:Foo!NN,size_t NN)(T f) { }

That works. But I want to find out if it is possible to write the opAssign template method with a conditional in the following form. This will help me optimize code better. Kindly suggest what would come in place of ....... below.

void opAssign (T)(T f) if(is(T .......)) { }


void opAssign (T)(T f) if(is(T L : Foo!(NN,MM), int NN, int MM)) { }

I found that the above declaration compiles. But again it compiles with int as parameter type. Fails for size_t.

Any other idea?

Regards
- Puneet