Code compiles and passes tests without NO_STDLIB define
This commit is contained in:
parent
6ba83fd582
commit
9bd1104e5f
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "std_lib.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
#ifndef CONST_FMT_NO_CPP_STD_LIB
|
#ifndef CONST_FMT_NO_CPP_STD_LIB
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,7 @@ template <std::size_t N>
|
|||||||
class ConstString {
|
class ConstString {
|
||||||
public:
|
public:
|
||||||
constexpr ConstString(const char (&content)[N]) noexcept {
|
constexpr ConstString(const char (&content)[N]) noexcept {
|
||||||
std::copy(&content[0], (&content[N-1] + 1),
|
std::copy(&content[0], (&content[N - 1] + 1), m_content.begin());
|
||||||
m_content.begin());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr char operator[](std::size_t index) const noexcept {
|
constexpr char operator[](std::size_t index) const noexcept {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user