From 07dfd4ef3e52f4b189481c09db62b16ef525bb6c Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 10 Aug 2024 14:17:23 +1000 Subject: [PATCH] fixed_string: manually copy string data to avoid --- cruft/util/fixed_string.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cruft/util/fixed_string.hpp b/cruft/util/fixed_string.hpp index e88e63b3..18122a23 100644 --- a/cruft/util/fixed_string.hpp +++ b/cruft/util/fixed_string.hpp @@ -8,7 +8,7 @@ #pragma once -#include +#include /////////////////////////////////////////////////////////////////////////////// @@ -30,7 +30,8 @@ namespace cruft { constexpr fixed_string (char const _value[N+1]) noexcept { - std::copy_n (_value, N, value); + for (std::size_t i = 0; i <= N; ++i) + value[i] = _value[i]; } constexpr operator char const* () const { return value; }