I would say std::string and std::io are special cases and somewhat atypical. Both have large performance overheads. I think the standardization committee blessed existing implementationsite that had become popular rather than design one with performance in mind. Strings really ought to have been immutable by default.
Just because a language offers zero-cost abstractions, doesn't mean performance comes for free, one needs to know how to use them properly.
And be clever to chose libraries that are also designed with performance in mind.