From cc80e71a2a294c37b52ef7a05638d568b99d9dbf Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 14 Mar 2023 18:01:05 -0400 Subject: [PATCH] logging vectors --- include/blt/math/log_util.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/blt/math/log_util.h diff --git a/include/blt/math/log_util.h b/include/blt/math/log_util.h new file mode 100644 index 0000000..febd982 --- /dev/null +++ b/include/blt/math/log_util.h @@ -0,0 +1,26 @@ +/* + * Created by Brett on 14/03/23. + * Licensed under GNU General Public License V3.0 + * See LICENSE file for license detail + */ + +#ifndef BLT_TESTS_LOG_UTIL_H +#define BLT_TESTS_LOG_UTIL_H + +#include +#include +#include + +namespace blt { + + template + static inline logging::logger& operator<<(logging::logger& log, blt::vec vec){ + log << "("; + for (int i = 0; i < size; i++) + log << vec[i] << i == size-1 ? ")" : ", "; + return log; + } + +} + +#endif //BLT_TESTS_LOG_UTIL_H