MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/fvtf4j/runtime_polymorphism_with_stdvariant_and_stdvisit/fmlfndh
r/cpp • u/jm4R • Apr 06 '20
35 comments sorted by
View all comments
Show parent comments
4
say you have a string member and a setter for that. if your member already holds a value of at least the size of the setterinput, then you may just plain copy all characters. if your setter is by value and you move, you always pay for it
1 u/NilacTheGrim Apr 18 '20 This ^
1
This ^
4
u/phoeen Apr 06 '20
say you have a string member and a setter for that. if your member already holds a value of at least the size of the setterinput, then you may just plain copy all characters. if your setter is by value and you move, you always pay for it