mgastner / cartogram-cpp

Cartogram generator in C++
MIT License
8 stars 4 forks source link

Should we have an `stl_typedef.h`? #111

Open mgastner opened 2 years ago

mgastner commented 2 years ago

We often have long type declarations, for example:

std::vector<std::vector<intersection> >

I am wondering whether we should use a typedef for this declaration and, in fact, all other STL containers, similar to the way in which we handle CGAL types. It would shorten our code without running the risk of using namespaces, which is risky because many different things in our code are called 'map'. Thus, my proposal is to add a header file stl_typedef.h that contains lines such as:

typedef std::vector<intersection> intersection_vector;
typedef std::vector<intersection_vector> intersection_vector_2;