Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How do I write string_view to Cout() without copying to a String?
How do I write string_view to Cout() without copying to a String? [message #60282] Wed, 08 November 2023 15:03
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 220
Registered: June 2011
Experienced Member
Right now I'm using:

Cout().Put(str.begin(), str.length());


But it would be nice if Stream had an overload to do this automatically so I can write

Cout() << str;


Without it complaining about the lack of ToString() which demands an unnecessary copy, the same way it works with std::cout.
Previous Topic: While loop, sleep
Next Topic: Help needed with OptionTree
Goto Forum:
  


Current Time: Mon Apr 29 09:56:07 CEST 2024

Total time taken to generate the page: 0.03259 seconds