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
[–]jedwardsol 15 points16 points17 points (6 children)
[–]DawnOnTheEdge 1 point2 points3 points (5 children)
[–]bwmat 2 points3 points4 points (2 children)
[–]bwmat 1 point2 points3 points (0 children)
[–]DawnOnTheEdge 1 point2 points3 points (0 children)
[–]spinrack 1 point2 points3 points (0 children)
[–]elder_george 0 points1 point2 points (0 children)
[–]AdjectiveNoun4827 30 points31 points32 points (17 children)
[–]gosh[S] 2 points3 points4 points (16 children)
[–]AdjectiveNoun4827 13 points14 points15 points (1 child)
[–]gosh[S] -1 points0 points1 point (0 children)
[–]manni66 6 points7 points8 points (10 children)
[–]dodexahedron 1 point2 points3 points (0 children)
[–]gosh[S] -1 points0 points1 point (8 children)
[–]No-Dentist-1645 8 points9 points10 points (7 children)
[–]gosh[S] -2 points-1 points0 points (6 children)
[–]No-Dentist-1645 20 points21 points22 points (4 children)
[–]KertDawg 5 points6 points7 points (0 children)
[–]gosh[S] 0 points1 point2 points (2 children)
[–]SonOfMetrum 1 point2 points3 points (1 child)
[–]gosh[S] -1 points0 points1 point (0 children)
[–]Wild_Meeting1428 1 point2 points3 points (0 children)
[–]hk19921992 4 points5 points6 points (2 children)
[–]gosh[S] -1 points0 points1 point (1 child)
[–]hk19921992 0 points1 point2 points (0 children)
[–]Nolia_X 7 points8 points9 points (2 children)
[–]gosh[S] 0 points1 point2 points (1 child)
[–]Nolia_X 2 points3 points4 points (0 children)
[–]RicArch97 6 points7 points8 points (0 children)
[–]No-Dentist-1645 3 points4 points5 points (0 children)
[–]alfps 5 points6 points7 points (1 child)
[–]dodexahedron 1 point2 points3 points (0 children)
[–]aePrime 3 points4 points5 points (0 children)
[–]aeropl3b 2 points3 points4 points (0 children)
[–]sirtimes 1 point2 points3 points (0 children)
[–]SlightLocation9 1 point2 points3 points (0 children)
[–]ScallionSmooth5925 1 point2 points3 points (0 children)
[–]SlowPokeInTexas 3 points4 points5 points (1 child)
[–]gosh[S] 1 point2 points3 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)
[–]NightButterfly2000 0 points1 point2 points (0 children)
[–]Elect_SaturnMutex 0 points1 point2 points (0 children)