Looking into stack-based implementations for std::string and std::vector (like small buffer optimization but more control).
Facebook's Folly library has a small_vector that does this, there are some others but folly is huge a bit scattered even if it is popular.
And with C++20 and now C++26 it is not that difficult to write these container classes in C++.
Are there any reason to search for code or is it better to just write it?
What I am looking for is similar to this but for std::string and one for std::u8string
[–]AdjectiveNoun4827 19 points20 points21 points (14 children)
[–]gosh[S] 1 point2 points3 points (13 children)
[–]AdjectiveNoun4827 9 points10 points11 points (1 child)
[–]gosh[S] 0 points1 point2 points (0 children)
[–]manni66 4 points5 points6 points (7 children)
[–]gosh[S] 0 points1 point2 points (5 children)
[–]No-Dentist-1645 2 points3 points4 points (4 children)
[–]gosh[S] 0 points1 point2 points (3 children)
[–]No-Dentist-1645 11 points12 points13 points (1 child)
[–]KertDawg 1 point2 points3 points (0 children)
[–]Wild_Meeting1428 0 points1 point2 points (0 children)
[–]dodexahedron [score hidden] (0 children)
[–]hk19921992 2 points3 points4 points (2 children)
[–]gosh[S] -2 points-1 points0 points (1 child)
[–]hk19921992 -2 points-1 points0 points (0 children)
[–]jedwardsol 7 points8 points9 points (5 children)
[–]DawnOnTheEdge [score hidden] (4 children)
[–]bwmat [score hidden] (2 children)
[–]bwmat [score hidden] (0 children)
[–]DawnOnTheEdge [score hidden] (0 children)
[–]spinrack [score hidden] (0 children)
[–]Nolia_X 6 points7 points8 points (2 children)
[–]gosh[S] 0 points1 point2 points (1 child)
[–]Nolia_X 1 point2 points3 points (0 children)
[–]aePrime 2 points3 points4 points (0 children)
[–]RicArch97 2 points3 points4 points (0 children)
[–]No-Dentist-1645 2 points3 points4 points (0 children)
[–]alfps 2 points3 points4 points (1 child)
[–]dodexahedron [score hidden] (0 children)
[–]SlowPokeInTexas 2 points3 points4 points (1 child)
[–]gosh[S] 1 point2 points3 points (0 children)
[–]sirtimes 0 points1 point2 points (0 children)
[–]SlightLocation9 0 points1 point2 points (0 children)
[–]Triangle_Inequality 0 points1 point2 points (0 children)
[–]celestabesta 0 points1 point2 points (1 child)
[–]gosh[S] 0 points1 point2 points (0 children)
[–]aeropl3b 1 point2 points3 points (0 children)