What is the best way to write etl string_view to cout? #1035
Unanswered
mike919192
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
etl::string_view does not have an overload to write to cout. std::string_view does support this:
std::cout << view << '\n';
I made a test to provide my own overload and this is working.
This could be even more generalized if you want to avoid directly referencing std. This is also working, but maybe could cause some issues with overload resolution.
Just curious if anyone has run into this before and any other solutions.
Beta Was this translation helpful? Give feedback.
All reactions