I would make two suggestions (although neither may be to your liking).
First, look at how the standard library does it. Those guys are pretty clever. Examine, for instance, the std::valarray class.
Second, I would suggest (and I don't do this lightly) using inheritance. Yes, you'll have to duplicate some code, but most functions can be moved into a templated base class.
template<typename T, int n> class VectorBase { public: VectorBase operator+=(const VectorBase& rhs) { for (int i = 0; i < n; ++i) { m_data += rhs.m_data; } return *this; } // other operations... protected: T m_data[n]; };template<typename T> class Vector2: public VectorBase<T, 2> { public: Vector2(T x, T y) { i/* ... */ } };template<typename T> class Vector3: public VectorBase<T, 3> { public: Vector3(T x, T y, T z) { this->m_data[0] = x; this->m_data[1] = y; this->m_data[2] = z; } };main(){ Vector3<int> v0(0, 0, 0); Vector3<int> v1(1, 1, 1); v1 += v0;}