Skip to content

Commit

Permalink
Merge pull request #172 from elbeno/fix-string-view-construction
Browse files Browse the repository at this point in the history
🐛 Fix `string_view` construction
  • Loading branch information
lukevalenty authored Nov 20, 2024
2 parents 242020e + e9176c5 commit fd1e82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/stdx/ct_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ template <std::size_t N> struct ct_string {
constexpr static std::integral_constant<bool, N == 1U> empty{};

constexpr explicit(true) operator std::string_view() const {
return std::string_view{value.cbegin(), size()};
return std::string_view{value.data(), size()};
}

std::array<char, N> value{};
Expand Down

0 comments on commit fd1e82e

Please sign in to comment.