Skip to content
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

printfing_ostream manipulators copy the ostream & other construction issues #85

Open
eyalroz opened this issue Nov 18, 2020 · 0 comments
Assignees
Labels
bug Something isn't working fixed on development A fix for this issue has been committed to the development branch

Comments

@eyalroz
Copy link
Owner

eyalroz commented Nov 18, 2020

Unfortunately, it seems our lambda-based manipulators are implicitly returning a copy of, rather than a reference to, the ostream they got - due to the implicit return type deduction.

In fact, it probably doesn't make much sense to copy-construct printfing-ostreams in the first place. let's disallow that for now. Let's use references or construct explicitly.

Finally, the move-construction of printfing_ostream doesn't initialize most fields from the existing ostream's fields.

@eyalroz eyalroz added the bug Something isn't working label Nov 18, 2020
@eyalroz eyalroz self-assigned this Nov 18, 2020
eyalroz pushed a commit that referenced this issue Nov 18, 2020
* Now depending on strf version 12.2, see https://github.com/robhz786/strf/releases :
	* Some naming changes
	* Now making a `printer input` and then feeding it to a `char_printer` to actually print a value
* Made lambda-based manipulators return a reference, not a copy
* Disabled copying of `printing_ostream`s
* Fixed missing initializations in the move constructor of `printfing_ostream`
* Naming tweak in the unit tests
@eyalroz eyalroz added the fixed on development A fix for this issue has been committed to the development branch label Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed on development A fix for this issue has been committed to the development branch
Projects
None yet
Development

No branches or pull requests

1 participant