That is a pretty nice example, but you probably want to take the filling code and make it into a public method fill(const T& fill_value);

And change
Code:
private:
    T p_data;
to
Code:
private:
    T* p_data;
for it to work.