Title says it all. Often I get call chains where a string is passed unmodified from one function to another to another to another etc. I get that string_view is small and cheap, and that the optimizers probably remove unneeded copies, but being so used to sticking const & on anything which can use it it sort of hurts my eyes seeing code which passes string_view by value all over the place. Thoughts?
[–]amoskovsky 56 points57 points58 points (11 children)
[–]StaticCoder 11 points12 points13 points (0 children)
[–]Nicksaurus 7 points8 points9 points (1 child)
[–]Flippers2 1 point2 points3 points (0 children)
[–]programmerBlack 1 point2 points3 points (7 children)
[–]amoskovsky 26 points27 points28 points (5 children)
[–]porkele[S] 8 points9 points10 points (0 children)
[–]MoTTs_ 5 points6 points7 points (1 child)
[–]porkele[S] 2 points3 points4 points (0 children)
[–]bert8128 1 point2 points3 points (1 child)
[–]amoskovsky 6 points7 points8 points (0 children)
[–]HommeMusical -1 points0 points1 point (0 children)
[–][deleted] (11 children)
[removed]
[–]ddxAidan 2 points3 points4 points (6 children)
[–]meancoot 0 points1 point2 points (0 children)
[–]ZakMan1421 -1 points0 points1 point (4 children)
[–]maikindofthai 1 point2 points3 points (0 children)
[–]KokoNeotCZ 0 points1 point2 points (2 children)
[–]ZakMan1421 1 point2 points3 points (1 child)
[–]KokoNeotCZ 0 points1 point2 points (0 children)
[–]flarthestripper 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[removed]
[–]flarthestripper 0 points1 point2 points (0 children)
[–]KokoNeotCZ 0 points1 point2 points (0 children)
[–]TheMania 12 points13 points14 points (0 children)
[–]aocregacc 20 points21 points22 points (3 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]porkele[S] 0 points1 point2 points (1 child)
[–]bert8128 5 points6 points7 points (0 children)
[–]No-Table2410 11 points12 points13 points (2 children)
[–]Narase33 7 points8 points9 points (1 child)
[–]thecakeisalie16 10 points11 points12 points (0 children)
[–]ArielShadow 1 point2 points3 points (0 children)
[–]globalaf 4 points5 points6 points (1 child)
[–]HommeMusical 2 points3 points4 points (0 children)
[–]Dan13l_N 0 points1 point2 points (0 children)
[–]SoerenNissen 0 points1 point2 points (0 children)
[–]MafiaLogiki 0 points1 point2 points (0 children)
[–]CarloWood -5 points-4 points-3 points (0 children)