diff --git a/inc/format.h b/inc/format.h index c1abafd..c76463e 100644 --- a/inc/format.h +++ b/inc/format.h @@ -32,23 +32,6 @@ constexpr int get_output_len() { return result; } - -template -constexpr std::array get_init_array() { - std::array result; - - if constexpr (fmt_node.has_zero_padding) { - for (auto& c : result) - c = '0'; - } else { - for (auto& c : result) - c = ' '; - } - - return result; -} - - // TODO: See if this is possible with template constexpr std::array format_arg(arg_t arg) { diff --git a/inc/parse_types.h b/inc/parse_types.h index 46194a6..46b551f 100644 --- a/inc/parse_types.h +++ b/inc/parse_types.h @@ -2,6 +2,9 @@ #define LOGGER_PARSE_TYPES_H +#include + + namespace detail { diff --git a/inc/utility.h b/inc/utility.h index 168e3d0..0d8e20b 100644 --- a/inc/utility.h +++ b/inc/utility.h @@ -4,6 +4,8 @@ #include +#include "parse_types.h" + namespace detail { @@ -16,6 +18,22 @@ constexpr std::size_t const_pow(std::size_t base, std::size_t pow) { } +template +constexpr std::array get_init_array() { + std::array result; + + if constexpr (fmt_node.has_zero_padding) { + for (auto& c : result) + c = '0'; + } else { + for (auto& c : result) + c = ' '; + } + + return result; +} + + } // namespace detail