diff --git a/include/esc/glyph.hpp b/include/esc/glyph.hpp index 01c042f..a1cafd6 100644 --- a/include/esc/glyph.hpp +++ b/include/esc/glyph.hpp @@ -234,10 +234,11 @@ template [[nodiscard]] auto operator|(std::u32string_view sv, T attr) -> std::vector { - auto glyphs = std::vector{ - std::begin(sv), - std::end(sv), - }; + auto glyphs = std::vector{}; + glyphs.reserve(sv.length()); + for (auto const symbol : sv) { + glyphs.push_back({symbol}); + } return glyphs | attr; }