template error expected primary-expression before '>' token
<pre><code>template &lt;class T&gt;class vector{       //this is the part for my vector, which may lead to the error shown below.
protected:
    T* arr;
    void expand(){
        if(size&lt;capacity)return;
        if(capacity&lt;con)capacity=con;
        T* temp=new T[capacity=2*capacity];
        for(int i=0;i&lt;size;i++)temp[i]=arr[i];
        delete[] arr;
        arr=temp;
        temp=NULL;
    };
public:
    vector(int c=con,int s=0,T v=0){arr=new T[capacity=c];for(size=0;size&lt;s;arr[size++]=v);}
    T&amp; operator[](int r)const{return arr[r];}
    int insert(int r,const T&amp; e){            //inserting at designated place.
        expand();
        for(int i=size;i&gt;r;i--)arr[i]=arr[i-1];
        arr[r]=e;
        size++;
        return r;
    }
    int insert(const T&amp; e){                  //inserting at the end
        return insert(size,e);
    }
};
template&lt;class Tv&gt;class vertex{
public:
    Tv data;
    vertex(Tv const&amp; e):data(e){}
};
template&lt;class Tv,class Te&gt;class GraphMatrix{
private:
    vector&lt;vertex&lt;Tv&gt; &gt; v;
public:
    int insert(Tv const&amp; vt){
    return v.insert(vertex&lt;Tv&gt;(vt));    //error happens here "expected primary-expression before '&gt;' token."
    }
}
int main(){
    GraphMatrix&lt;int,int&gt; mail;
    int i=1;
    mail.insert(i);
}
</code></pre>

<p>I am using g++ compiler, and I got an error "expected primary-expression before '>' token".
Is it a  problem regarding template? How could I fix it? 
The problem now happens at inserting vertex(vt) into the vector written by me (my own vector).</p>