-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement << operator for std basic_ostream and etl string_view #1040
Conversation
It would probably be better to create overloads of |
Sorry I'm not sure what you mean by the comment. The definition for the function I added:
|
Sorry, my mistake. |
Add the overload for |
No problem. I will add the same overload for |
…ill working through tests
…/etl into string_view_to_stream
It's implemented and I think I have all the tests covered. Let me know if anything is missing. |
2b27c28
into
ETLCPP:pull-request/#1040-Implement-stream-operator-for-std-basic_ostream-and-etl-string_view
I recently wanted to print the contents of etl::string_view to std::cout and I realized that there is not yet an overload for the
<<
operator. I decided to experiment with adding the function overload and all seems to be working.I put the function overload and unit test behind
ETL_USING_STL
macro. It will not be including in no stl configs. For the unit test I am using std::stringstream variants, but I have also tested with std::cout.If this is acceptable I would think that the same could be done for etl::string. Let me know of any comments. Thanks