Build fix

Make sure nullchar is created in
a generic way. Also, for some
reason template argument deduction
was failing.
This commit is contained in:
King_DuckZ 2024-05-24 04:10:27 +02:00
parent ebca413c0a
commit ac8a84fc01

View file

@ -146,7 +146,7 @@ namespace dhandy {
template <std::size_t S, typename Ch> template <std::size_t S, typename Ch>
template <std::size_t Start, std::size_t Len> template <std::size_t Start, std::size_t Len>
constexpr auto string<S, Ch>::substr() const { constexpr auto string<S, Ch>::substr() const {
return string<std::min(S - 1 - std::min(Start, S - 1), Len) + 1, Ch>(m_data + std::min(Start, S - 1), 0) + string(""); return string<std::min(S - 1 - std::min(Start, S - 1), Len) + 1, Ch>(m_data + std::min(Start, S - 1), 0) + string<1, Ch>({Ch{}});
} }
} //namespace bt } //namespace bt
} //namespace dhandy } //namespace dhandy