utils: print a vector

This commit is contained in:
Mylloon 2023-12-31 03:29:40 +01:00
parent 5bfd9dd6a6
commit 551a644490
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

13
includes/utils.hpp Normal file
View file

@ -0,0 +1,13 @@
#pragma once
#include <iostream>
#include <vector>
template <typename T>
void print_vec(std::vector<T> vec) {
std::cout << "[ (" << vec.size() << ")\n";
for (auto it : vec) {
std::cout << " " << it << "\n";
}
std::cout << "]\n";
}