struct row_major{};
struct col_major{};
struct heap{};
struct stack{};
...
template<typename T=double, typename Orientation=col_major, typename Where=heap>
class vector{
...
}
vector<float, row_major, heap> v1;
//float, row_major, heap
vector<double, row_major> v2;
//double, row_major, heap
vector<> v3;
//double, col_major, heap
template <typename T, unsigned N>
T sum(const T(&array)[N]){
T sum(0);
for (int i=0; i<N; ++i>){
sum += array[i];
}
r return sum;
}