Minor changes to make sure some stuff works with no stl headers

This commit is contained in:
Andreas Tsouchlos 2022-02-20 00:15:31 +01:00
parent 8f7b1cd4e3
commit 6ba83fd582
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,8 @@
#define LOGGER_TYPES_H
#include <array>
#include "std_lib.h"
namespace const_fmt { namespace const_fmt_detail {
@ -19,8 +20,8 @@ template <std::size_t N>
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 {

View File

@ -2,8 +2,9 @@
#define LOGGER_UTILITY_H
#include <cstring>
#include <string.h>
#include "std_lib.h"
#include "types.h"