From 6ba83fd582e2ac61ab3e8acdc62eb38ccbe4920f Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sun, 20 Feb 2022 00:15:31 +0100 Subject: [PATCH] Minor changes to make sure some stuff works with no stl headers --- const_fmt/types.h | 7 ++++--- const_fmt/utility.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/const_fmt/types.h b/const_fmt/types.h index 071937a..688e4b8 100644 --- a/const_fmt/types.h +++ b/const_fmt/types.h @@ -2,7 +2,8 @@ #define LOGGER_TYPES_H -#include + +#include "std_lib.h" namespace const_fmt { namespace const_fmt_detail { @@ -19,8 +20,8 @@ template class ConstString { public: constexpr ConstString(const char (&content)[N]) noexcept { - std::copy(std::begin(content), std::end(content), - std::begin(m_content)); + std::copy(&content[0], (&content[N-1] + 1), + m_content.begin()); } constexpr char operator[](std::size_t index) const noexcept { diff --git a/const_fmt/utility.h b/const_fmt/utility.h index e87a664..3a261c5 100644 --- a/const_fmt/utility.h +++ b/const_fmt/utility.h @@ -2,8 +2,9 @@ #define LOGGER_UTILITY_H -#include +#include +#include "std_lib.h" #include "types.h"