diff --git a/includes/utils.hpp b/includes/utils.hpp index 85bdaa5..7d3381b 100644 --- a/includes/utils.hpp +++ b/includes/utils.hpp @@ -4,10 +4,16 @@ #include template -void print_vec(const std::vector vec) { +void print_vec(const std::vector vec) { std::cout << "[ (" << vec.size() << ")\n"; - for (const T it : vec) { - std::cout << " " << it << "\n"; + for (const T &it : vec) { + std::cout << " "; + if (std::is_pointer::value) { + std::cout << *it; + } else { + std::cout << it; + } + std::cout << "\n"; } std::cout << "]\n"; }