From 9bd1104e5fd44cb25ebab81f663a9166970a0b70 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sun, 20 Feb 2022 00:26:48 +0100 Subject: [PATCH] Code compiles and passes tests without NO_STDLIB define --- const_fmt/format_impl.h | 1 + const_fmt/std_lib.h | 1 + const_fmt/types.h | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/const_fmt/format_impl.h b/const_fmt/format_impl.h index 73748f9..a561668 100644 --- a/const_fmt/format_impl.h +++ b/const_fmt/format_impl.h @@ -12,6 +12,7 @@ #include +#include "std_lib.h" #include "utility.h" diff --git a/const_fmt/std_lib.h b/const_fmt/std_lib.h index 305e066..4fb5820 100644 --- a/const_fmt/std_lib.h +++ b/const_fmt/std_lib.h @@ -5,6 +5,7 @@ #ifndef CONST_FMT_NO_CPP_STD_LIB #include +#include #else diff --git a/const_fmt/types.h b/const_fmt/types.h index 688e4b8..dcf1990 100644 --- a/const_fmt/types.h +++ b/const_fmt/types.h @@ -20,8 +20,7 @@ template class ConstString { public: constexpr ConstString(const char (&content)[N]) noexcept { - std::copy(&content[0], (&content[N-1] + 1), - m_content.begin()); + std::copy(&content[0], (&content[N - 1] + 1), m_content.begin()); } constexpr char operator[](std::size_t index) const noexcept {