#include <iostream>


namespace MATH {


template <std::size_t M, std::size_t N, class T>
class Matrix
{

};

void invert(Matrix<2, 2, double>& m)
{
    std::cout << "DIM 2 : MATH version (use of the determinant)" << std::endl;
}

void invert(Matrix<3, 3, double>& m)
{
    std::cout << "DIM 3 : MATH version (use of the determinant)" << std::endl;
}


}


namespace GEOM {


//template <std::size_t N>
//using Matrix = MATH::Matrix<N, N, double>;// orthonormal set of vectors
template <std::size_t N>
class Matrix : public MATH::Matrix<N, N, double> {};// orthonormal set of vectors


template <std::size_t N>
void invert(Matrix<N>& m)
{
    std::cout << "DIM " << N << " : GEOM version (use of the transpose)" << std::endl;
}

void geom_foo_purpose(Matrix<3>& m)
{
    invert(m);
}


}


int main(int argc, char **argv)
{
    GEOM::Matrix<3> m;
    GEOM::geom_foo_purpose(m);
    MATH::invert(m);
    
    return 0;
}